CategoriesWithProducts.CategoriesWithProductsUI.Main C# (CSharp) Метод

Main() статический приватный Метод

static private Main ( ) : void
Результат void
        static void Main()
        {
            string decorationLine = new string('-', Console.WindowWidth);
            Console.Write(decorationLine);
            Console.WriteLine("***Getting the categories and the prodcuts in them");
            Console.WriteLine("from the 'Northwind' database***");
            Console.Write(decorationLine);

            SqlConnection dbConnection = new SqlConnection(Settings.Default.DBConnectionString);

            IEnumerable<string> categoriesWithProducts = GetCategoriesWithProducts(dbConnection);
            Console.WriteLine("The categories and the products in them are:");
            foreach (string categoryProductPair in categoriesWithProducts)
            {
                Console.WriteLine("{0}", categoryProductPair);
            }
        }
CategoriesWithProductsUI