Here I will explain how to show or display output console window in c#.net or how to solve the problem of closing output console window immediately in c#.
In previous articles I explained polymorphism example in c#, delegates in c# with example, Difference b/w compile time and runtime polymorphism, sealed classes in c#.net and many articles relating to c#, code snippets. Now I will explain how to solve the problem of closing output console window immediately in c#.
Show output console window
Generally whenever we run console applications once that execution finished automatically output window will close and return to application. In this situation if you want to show output window even if application execution finish we need to add Console.ReadLine()at the end of your code like as shown below
static void Main(string args)
Console.WriteLine("Welcome to Aspdotnet-Suresh.com");
I hope it helps you. Happy coding...