Creating a new console application (Visual Studio)

Creating a new console application (Visual Studio)




In this post we are trying to make a visual studio console application and then run. here we Explain  step by step processor. 

Open Visual Studio


In the toolbar, go to File → New Project

Select the Console Application project type

Open the file Program.cs in the Solution Explorer

Add the following code to Main():

public class Program
{
    public static void Main()
    {
        // Prints a message to the console.
        System.Console.WriteLine("Hello, World!");

        /* Wait for the user to press a key. This is a common
           way to prevent the console window from terminating
           and disappearing before the programmer can see the contents
           of the window, when the application is run via Start from within VS. */
        System.Console.ReadKey();
    }
}

In the toolbar, click Debug -> Start Debugging or hit F5 or ctrl + F5 (running without debugger) to run the program.


Sql Server Interview Qus:



Comments