How to create exe in C# .net?

Here you will learn how to create exe file in visual studio. Making and Running an Executable File. You can make an executable file (.exe) from Visual Studio using the following procedure. I'm using visual studio 2013 for this.

Step 1.

Create a New Window Application Form in Microsoft Visual Studio.

Step 2.

Design your Window Application Form like below form. This is design of my application. You can design your application with your own style. Here I am creating application with database. In this application I am storing and retrieving Name and Phone No of any type.

Step 4. Coding Part

After creating table in Sql Server move back to your window application form and double click on Save Data button. Now write following code in button click event.
First you need to add one namespace. Open the code view form (Form1.cs) and write the below namespace.

Step 5.

Now create a second Form 2 for retrieving the data from database. Now double click on Show Data button in first form and write the below coding. This code for calling the second form on button2 click event.