Exemple #1
0
        static void Main(string[] args)
        {
            EmpDataService empData = new EmpDataService();
            var            data    = empData.GetAllRecords();
            var            table   = data.Tables[0];

            foreach (DataRow row in table.Rows)
            {
                Console.WriteLine(row["EmpName"]);
            }
        }
        static void Main(string[] args)
        {
            //Create the instance of the service object
            EmpDataService empData = new EmpDataService();
            var            data    = empData.GetAllRecords();//Call the method
            var            table   = data.Tables[0];

            foreach (DataRow row in table.Rows)
            {
                Console.WriteLine(row["EmpName"]);
            }
        }
        static void Main(string[] args)
        {
            //Create the instance of the service object
            EmpDataService empData = new EmpDataService();
            var            data    = empData.GetAllEmployees();//Call the method

            foreach (var name in data)
            {
                Console.WriteLine(name.ToUpper());
            }
            //Iterate thro the collection...
        }