User:CodingBot02/C Sharp Tutorial/Your First C Sharp Program

Your First C# Program To create a C# program, you need to install an integrated development environment ( IDE ) with coding and debugging tools. We will be using Visual Studio Community Edition, which is available to download for free. After installing it, choose the default configuration. Next, click File->New->Project and then choose Console Application as shown below: Enter a name for your project and click OK. Console application uses a text-only interface. We chose this type of application to focus on learning the fundamentals of C#. Visual Studio will automatically generate some code for your project: You will learn what each of the statements does in the upcoming lessons. For now, remember that every C# console application must contain a  method (a function) named Main. Main is the starting point of every application, i.e. the point where our program starts execution from. We will learn about classes, methods, arguments, and namespaces in the upcoming lessons. To run your program, press Ctrl+F5. You will see the following screen: This is a console window. As we did not have any statements in our Main method, the program just produces a general message. Pressing any key will close the console. Congratulations, you just created your first C# program.