I basically want to do this in code:
PersonList myPersonList;
//populate myPersonList here, not shown
Foreach (Person myPerson in myPersonList)
{
...
}
Class declare
public class PersonList
{
public List<Person> myIntenalList;
Person CustomFunction()
{...}
}
So how do I expose "myInternalList" in my class as the default value that the Foreach statement can use it? Or can I? Reason being is that I have about 50 classes that are currently using GenericCollection that I'd like to move to generics but don't want to re-write a ton.