예제 #1
0
        static void Main(string[] args)
        {
            var company = new CompanyOrig("Peter", "Paul", "Mary");

            foreach (var worker in company)
            {
                Console.WriteLine(worker);
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            var company = new CompanyOrig("Peter", "Paul", "Mary");

            foreach (var worker in company)
            {
                Console.WriteLine(worker);
            }

            // Write code in Main that initializes an int array and calls GetEvens
            int[]             ints  = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
            IEnumerable <int> evens = GetEvens(ints);

            foreach (var i in evens)
            {
                Console.WriteLine(i);
            }
        }