Sunday, July 19, 2009

C# Coding Standards

C# has 95 keywords that make up the language syntax compared to Java's 50.  C# has 11 numeric types (integer types, float, double and decimal) and boolean, char, string and object. User defined types can be class, struct, array, enum, delegate or interface. C# suggested naming standard is slightly different from Java's.

Pascal Case
Class Name
Member Name
Method Name

Camel Case
Method Local
Method Parameter

Comments
There are three ways of denoting a comment
Single line comment //
Multi-line comment /* --- */
Document comment ///

Example Program
class HelloWorld
{
 static void Main()
 {
     System.Console.WriteLine("Hello, world!");
 }
}