foreach in arraylist c#
foreach (object __o in list) {
string s = (string)__o;
// loop body
}
foreach in arraylist c#
foreach (object __o in list) {
string s = (string)__o;
// loop body
}
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();
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us