using System;
using System.Data;
using System.Collections.Generic;
using System.Text;

namespace TableReaderDemo
{
   class Program
   {
      static void Main(string[] args)
      {
         DataTable dt = new DataTable("Customers");
         // wczytaj dane z poprzedniego przykładu
         dt.ReadXml(@"..\..\..\..\18.1 TableXml\TableXml\bin\debug\Customers.xml");
         DataTableReader dtr = dt.CreateDataReader();
         while (dtr.Read())
         {
            Console.WriteLine("[{0}] {1} {2}",
              (int)dtr["CustomerID"],
              (string)dtr["FirstName"], (String)dtr["LastName"]);
         }
         Console.ReadLine();
      }
   }
}
