J
juan
hi i have an arraylist that has doctor objects with various properties,
members and methods.
i want to enumerate this arraylist object.
but i dont understand how.
this is what i have done
ArrayList arrDoctors = Doctors.GetAllDoctors();
for (int cnt =0;cnt<1; cnt++)
{
Doctor p = (Doctor) arrDoctors[cnt];
Messagebox.show (p.Name);
//many other properties
}
what is the advantage of enumerators over what i have done?
and how do i implement them for my doctors array
members and methods.
i want to enumerate this arraylist object.
but i dont understand how.
this is what i have done
ArrayList arrDoctors = Doctors.GetAllDoctors();
for (int cnt =0;cnt<1; cnt++)
{
Doctor p = (Doctor) arrDoctors[cnt];
Messagebox.show (p.Name);
//many other properties
}
what is the advantage of enumerators over what i have done?
and how do i implement them for my doctors array