Exemplo n.º 1
0
        static void Main(string[] args)
        {
            MyData[] peopleArray = new MyData[3]
            {
            new MyData("John",14),
            new MyData("Jim", 15),
            new MyData("Sue",16),
            };

            MyPeople myP = new MyPeople(peopleArray);
            foreach (MyData p in myP)
                Console.WriteLine(p.Name + " " + p.Age);
        }
Exemplo n.º 2
0
 public Em(MyData[] myEm)
 {
     _myList = myEm;
 }
Exemplo n.º 3
0
        public MyPeople(MyData[] myList)
        {
            _myList = new MyData[myList.Length];

            for (int i = 0; i < _myList.Length; i++)
            {
                _myList[i] = myList[i];
            }
        }