CategoriesNamesAndDescriptions.CategoriesNamesAndDescriptionsUI.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 names and the descriptions of the categories");
            Console.WriteLine("in the 'Northwind' database***");
            Console.Write(decorationLine);

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

            IEnumerable<string> categoriesInfo = GetCategoriesInfo(dbConnection); 
            Console.WriteLine("The names and the descriptions of the categories are:");
            foreach (string categoryInfo in categoriesInfo)
            {
                Console.WriteLine("- {0}", categoryInfo);
            }
        }
CategoriesNamesAndDescriptionsUI