Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            string    filePath = @"G:\G_Work\Pluralsight\Courses\Beginning Effective Collections\Code\Pop by Largest Final.csv";
            CsvReader reader   = new CsvReader(filePath);

            Country[] countries = reader.ReadFirstNCountries(10);

            foreach (Country country in countries)
            {
                Console.WriteLine($"{PopulationFormatter.FormatPopulation(country.Population).PadLeft(15)}: {country.Name}");
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            string    filePath = @"c:\temp\Pop by Largest Final.csv";
            CsvReader reader   = new CsvReader(filePath);

            Country[] countries = reader.ReadFirstNCountries(10);

            foreach (Country country in countries)
            {
                Console.WriteLine($"{PopulationFormatter.FormatPopulation(country.Population).PadLeft(15)}: {country.Name}");
            }
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            string    filePath = @"C:\Users\tarep\Documents\PluralSight\BeginningCSharpCollections_Pluralsight\Pop by Largest Final.csv";
            CsvReader reader   = new CsvReader(filePath);

            Country[] countries = reader.ReadFirstNCountries(10);

            foreach (Country country in countries)
            {
                Console.WriteLine($"{PopulationFormatter.FormatPopulation(country.Population).PadLeft(15)}: {country.Name}");
            }

            Console.ReadLine();
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            string    filePath = @"C:\cs\pluralsight\csharp-collections-beginning\Pop by Largest Final.csv";
            CsvReader reader   = new CsvReader(filePath);

            List <Country> countries = reader.ReadAllCountries();

            foreach (Country country in countries)
            {
                Console.WriteLine($"{PopulationFormatter.FormatPopulation(country.Population).PadLeft(15)}: {country.Name}");
            }
            Console.WriteLine($"Total Countries count is: {countries.Count}");
            Console.ReadKey();
        }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            string    filePath = @"E:\Capgemini\Azure Training\C# Collections\TopTenPops\Pop by Largest Final.csv";
            CsvReader reader   = new CsvReader(filePath);

            Country[] countries = reader.ReadFirstNCountries(10);

            foreach (Country country in countries)
            {
                Console.WriteLine($"{PopulationFormatter.FormatPopulation(country.Population).PadLeft(15)}: {country.Name}");
            }

            Console.ReadLine();
        }