What the VS.NET 2005 C# Windows Application wizard gives you

Last modified 08/07/2006

 
When you open a new project in VS.NET and select "C#" and "Windows Application", you get a program with a single empty form.

The form has a boring gray background and a boring icon.

 
 
The standard project with every item expanded is shown at right.  
 
You can examine the project's properties by right-clicking the project and selecting Properties, as shown at right.  
 
The project property sheet's default values are shown at right.  
 
The C# source files generated for you at the top level are shown at right.

Note that the Form1 class is scattered across two different files, one for programmer code and one for automatically generated code.
 

 

Form1.cs is where the programmer should add code to the form.

Form1.Designer.cs is the code generated for the programmer by the Windows Forms Designer, the feature of Visual Studio that let's you drag Controls from the Toolbox and drop them onto form.  We need to learn why most of this generated code is there, because sometimes we need to write similar code ourselves, but without interfering with the generated code.  Programmers usually should not modify any file that has a name ending in Designer.cs.

Program.cs contains the Main() method which is the entry point of the application.
 

The C# and XML files generated for you in the Properties folder are shown at right.  

AssemblyInfo.cs is <tba>.

Resources.Designer.cs is <tba>.  Programmers usually should not modify any file that has a name ending in Designer.cs.

Resources.resx is a resource file in XML format <tba>

Settings.Designer.cs is <tba>.  Programmers usually should not modify any file that has a name ending in Designer.cs.

Settings.settings is a settings file in XML format <tba>

 

 

 

 

 

 

 

 

Finally, here's the code:



Visitors:
Hit Counter