C#is a basic, present day, broadly useful, an object-oriented programming language created by Microsoft inside its .NET activity driven by Anders Hejlsberg. C# does not offer worldwide factors or capacities. Everything is enclosed by classes, even straightforward information types like int and string, which acquire from the System. object class. And also, I will take you through different propelled ideas identified with the C# programming language. In a genuine situation, we regularly utilize Visual Studio tool and C# programming language to make either Windows Forms applications or Web-based applications. Windows Forms Applications is a Graphical User Interface(GUI) class library which is bundled in.Net Framework. Its main purpose is to provide an easier interface to develop the applications for desktop, tablet, PCs. It is also termed as the WinForms. The applications which are developed by using Windows Forms or WinForms are known as the Windows Forms Applications that run on the desktop computer. WinForms can be used only to develop the Windows Forms Applications which can contain the different type of controls like labels, buttons, textboxes, tooltip and much more. You can Download Visual Studio Community 2017 Free Version, fully-featured IDE for students, open-source and individual developers.
So, to get started with this tutorial, go ahead and download Visual Studio Community2017 from visualstudio.com. Here's a direct link to the download page:
Download Link-https//www.visualstudio.com/download
To create Windows Forms Application Using Visual Studio.
Open Visual Studio 2017
On the menu bar, choose File > New > Project. Choose Visual C# on the left side of the New Project dialog box.
In the templates list, choose Windows Forms App (.NET Framework). Name it as My first project, and then click on the OK button.
Note
If you don't see the Windows Forms App (.NET Framework) template, use the Visual Studio Installer to install the .NET desktop development workload.
The Visual Studio development environment contains three windows.
1-Main window
2-Solution Explorer
3-Properties window
1-Main window- In this window, you'll do most of your work, such as working with forms and editing code. The window shows a form in the Form Editor.
2-Solution Explorer window- In this window, you can view and navigate to all items in your solution. If you choose a file, the contents of the Properties window changes. If you open a code file (which ends in .cs in Visual C# and .vb in Visual Basic), the code file or a designer for the code file appears. A designer is a visual surface onto which you can add controls such as buttons and lists. For Visual Studio forms, the designer is called the Windows Forms Designer.
3-Properties window- In this window, you can change the properties of items that you choose in the other windows. For example, if you choose Form1, you can change its title by setting the Text property, and you can change the background color by setting the Backcolor property.
Basic controls
1- Run your program
Press the F5 key on your keyboard else you can go to the toolbar section, Click on the Start Debugging button as shown in the figure below.
2-Stop your Program
Go to the toolbar section, Click on the Stop Debugging button or press Shift+F5 to Stop Debugging as shown in the figure below.
3-Save your Program
Go to the toolbar section, Click on the Save button else go to the menu bar section and choose File > Save All, as shown in the figure below.