I am currently developing a windows form application and I have a arraylist notificationList that contains notificationForms.
How do I use a for loop to loop through every single form in the arrayList to check if the forms are disposed through the isDisposed property?
int formDisposed = 0;
for (int i = 0; i < notificationList.Count; i++)
{
if(notificationList.?????.IsDisposed == true)
{
formDisposed ++;
}
}
Thanks!
Usually by using
if for some reason you don’t have this option: add the following line to your .cs file
and Syste.Data and Syste.Data.DataSetExtensions so you will able to access xxx.ElementAt(i) method.
You can also use foreach: