verwenden
Code: Select all
ArrayList arrayList = GetArrayListOfInts();
List intList = new List();
//Can this foreach be condensed into one line?
foreach (int number in arrayList)
{
intList.Add(number);
}
return intList;
Code: Select all
ArrayList arrayList = GetArrayListOfInts();
List intList = new List();
//Can this foreach be condensed into one line?
foreach (int number in arrayList)
{
intList.Add(number);
}
return intList;