C# Simplified, part 6: Working with Windows Applications - My first WinForm application
(Page 2 of 4 )
In this section, you will learn how to develop a classic "HelloWorld" Windows application. Enter the code given in listing 6.1 using Notepad:
Listing 6.1
HelloWorldWin1.cs
001: // HelloWorldWin1.cs
002: // -----------------
003: using System;
004: using System.Windows.Forms;
005:
006: public class HelloWorldWin1:Form
007: {
008:
009: public HelloWorldWin1()
010: {
011: // Add your additional code(s) here
012: }
013:
014: public static void Main()
015: {
016: Application.Run(new HelloWorldWin1());
017: }
018: }
Save the file with the name HelloWorldWin1.cs and compile the program as shown below.
Compilation
csc HelloWorldWin1.cs
Execution
HelloWorldWin1
Output

Figure 6.1
From the above output you can infer that the code produces a blank form with Minimize, Maximize and Close buttons.
Next: Code Analysis >>
More C# Articles
More By Anand Narayanaswamy