Answers for "foreach in list of arrays c#"

C#
1

c# list foreach

someList.ForEach(x => { if(x.RemoveMe) someList.Remove(x); });
Posted by: Guest on August-11-2020
0

foreach in arraylist c#

ArrayList x=new ArrayList();
x.Add(10);
x.Add("SS");

IEnumerator enumerator = (x).GetEnumerator();
try {
   while (enumerator.MoveNext()) {
      string element = (string)enumerator.Current; // here is casting occures
      // loop body;
   }
}
finally {
   IDisposable disposable = enumerator as System.IDisposable;
   if (disposable != null) disposable.Dispose();
}
Posted by: Guest on June-24-2021

C# Answers by Framework

Browse Popular Code Answers by Language