NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

General Structure of a C# Program

C# programs can consist of one or more files. Each file can contain one or more namespaces. A namespace can contain types such as classes, structs, interfaces, enumerations, and delegates, in addition to other namespaces. The following is the skeleton of a C# program that contains all of these elements.

// A skeleton of a C# program 
using System;
namespace MyNamespace1 {
   class MyClass1 {
   }
   struct MyStruct {   
   }
   interface IMyInterface {      
   }
   delegate int MyDelegate();
   enum MyEnum {} 
   namespace MyNamespace2 {   
   }
   class MyClass2 {
      public static void Main(string[] args) {      
      }
   }
}

See Also

C# Language Tour