Microsoft 9GD00001 Computer Accessories User Manual


 
Chapter 2: Learning Just Enough C# or VB.NET: Basic Syntax 39
into a project depend on the project type. For example, there are project items that are part
of a WPF application but wouldn’t be part of a Console application. Of particular interest
in the FirstProgram project is the file named Program.cs (or Module1.vb if programming
in VB), which is a code file, as we’ll discuss in the next section.
Examining the Code Skeleton
Having run the New Project Wizard for a Console application, you’ll see a file named
Program.cs (or Module.vb) that contains skeleton code in the editor.
VS will create
skeleton code using built-in templates for most project types that you create. Y
ou’re free
to add, remove, or modify this code as you see fit. Listing 2-1 contains the skeleton code,
which I’ll explain next.
Listing 2-1 Console application skeleton code
C#:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FirstProgram
{
class Program
{
static void Main(string[] args)
{
}
}
}
VB:
Module Module1
Sub Main()
End Sub
End Module