Example #1
0
 public People(Person[] pArray)
 {
     _people = new Person[pArray.Length];
     for (int i = 0; i < pArray.Length; i++)
     {
         _people[i] = pArray[i];
     }
 }
Example #2
0
 public PeopleEnum(Person[] list)
 {
     _people = list;
 }
Example #3
0
        static void Main(string[] args)
        {
            Person[] peopleArray = new Person[3]
                {
                    new Person("John", "Smith"),
                    new Person("Jim", "Johnson"),
                    new Person("Sue", "Rabon"),
                };

            Person pp = new Person("John", "Smith");

            People peopleList = new People(peopleArray);
            foreach (Person p in peopleList)
                Console.WriteLine(p.firstName + " " + p.lastName);
        }