Learn C#, VB.net with Samples in 1 Day



C# Coding Guidelines, Standards, Conventions

Good   Correct Bad   Correct
class SomeClass {

}
class someClass {

}
struct SomeStruct {

}
struct someStruct {

}
interface ISomeInterface {

}
interface iSomeInterface {

}
void SomeMethod() {

}
void someMethod() {

}
int someVariable; int SomeVariable;
class EmployeeDetails {

}
class ED {

}
class EmployeeDetails {

void Add() {...}
void Delete() {...}

}
class EmployeeDetails {

void AddEmployeeDetails() {...}
void DeleteEmployeeDetails() {...}

}
if ( (a>0) && (a<10) ) {
...
}
if ( (a>0) & (a<10) ) {
...
}
if ( (a>0) || (a<10) ) {
...
}
if ( (a>0) | (a<10) ) {
...
}
using System.Text; using system.text;
string name; string strName;
public enum Color
{
    Red,
    Green,
    Blue
}
public enum Colors
{
    Red,
    Green,
    Blue
}
public DateTime someIdentifier;
public DateTime _someIdentifier;
public DateTime some_Identifier;

I'll add more - Vijay



Test your .net skills with Quiz