Put a Console.Read() as the last line in your program. That will prevent it from closing until you press a key
static void Main(string[] args)
{
StringAddString s = new StringAddString();
Console.Read();
}
More Related Contents:
- Opening a text file is passed as a command line parameter [closed]
- Cannot Implicitly Convert int to int[] [closed]
- C# – variable not setting from another class
- Why does this nested loop output starts at 8 and 18?
- How can I get the application’s path in a .NET console application?
- How to write Unicode characters to the console?
- How do I show a console output/window in a forms application?
- Could not load file or assembly … An attempt was made to load a program with an incorrect format (System.BadImageFormatException)
- .NET console application as Windows service
- Custom text color in C# console application?
- .NET Global exception handler in console application
- Global hotkey in console application
- Displaying Arabic characters in C# console application
- Command to close an application of console?
- Why the default SynchronizationContext is not captured in a Console App?
- How to display list items on console window in C#
- Console App Mouse-Click X Y Coordinate Detection/Comparison
- What is the command to exit a console application in C#?
- C# console application icon
- How to fix “No overload for method ‘ ‘ takes 0 arguments”?
- Password masking console application
- Non-Blocking read from standard I/O in C# [closed]
- Compile to a stand-alone executable (.exe) in Visual Studio
- When should one use Environment.Exit to terminate a console application?
- How do I compile my App.config into my exe in a VS2010 C# console app?
- Changing font in a Console window in .NET
- Is it possible to send Toast notification from console application?
- how to handle spaces in file path if the folder contains the space?
- ASP.NET Core configuration for .NET Core console application
- CPU friendly infinite loop