Learn C# Part One

This article covers the basics in creating a C# application. This is intended for audiences who have a little background on programming and software installation on Microsoft Windows platform.

C# is a programming language created by Microsoft. It runs under the .Net framework. C# code is similar to Java and C++. This tutorial covers the basics of creating a C# Windows Application. For a start, let’s get familiarized with the tool used in creating a C# application:

  1. Download the C# IDE (You can either purchase the full Microsoft Visual Studio .Net or download the express version from Microsoft’s site at http://www.microsoft.com/express/download/#webInstall)
  2. Install the C# IDE
  3. Run the IDE. I’m using the C# express 2008 version.
  4. On the upper left corner, click on “Project…” next to the “Create” label. A window like the following will appear.
  5. Change the name of the project to your desired project name. Default project name is WindowsFormsApplication1
  6. The default contents of the project will include one form named Form1.cs, the Program.cs, and other files.
  7. Program.cs is the main file of your application. It calls the Form1.cs so that when you run the program, the form appears firsthand.
  8. Now you have created your first C# Windows Application. You can put contents to the form by clicking on the Toolbox tab at the left side of the IDE. Just drag and drop the item of your choice to the form. 
  9. CREATING THE HELLO WORLD application: Drag a “label” control to the form. Each control will have its own properties which you can see from the lower right portion of the IDE.Look for the property labeled with “Text” and replace its value with “Hello World”.
  10. Run the program by pressing F5. You now have created a Hello World application.

Leave Your Response