c# etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
c# etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

26 Mart 2011 Cumartesi

C# - convert DataTable to ArrayList

I need to output a result list which i have as DataTable from a C# web service. So, i have to convert it to ArrayList before using..
here is a code for conversion:
private ArrayList ConvertDT(ref DataTable dt) {
ArrayList converted = new ArrayList(dt.Rows.Count);

foreach (DataRow row in dt.Rows){
converted.Add(row);
}

return converted;
}

// for access
((DataRow)list[0])["startTime"].ToString()


10 Mart 2011 Perşembe

warning C4996: 'fopen' was declared deprecated

in visual studio 2008 environment, to get rid of warnings such as
warning C4996: 'fopen' was declared deprecated
do the following:

add _CRT_SECURE_NO_DEPRECATE to Project Properties -> Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions.

error: error spawning cmd.exe

While trying to build a component in Visual Studio 2008 environment, i got the error error spawning cmd.exe

sorry, i could not remember where i discovered this solution, but it worked:

In the Options go into Projects and Solutions -> VC++ Directories page and place this rows:

$(SystemRoot)\System32