Wednesday, May 13, 2009

Coading Tips

There are following tips for coding
use #region block
example:
#region regionName
//Do your work
#endregion
Declare all the variables at the top of constructor
example:
public class UClass
{
string globalString;
public UClass()
{
int a, b , c;
string str1, str2;
}

string s; //Avoid to declare variable here

public string retVal(string s)
{
return s;
}
}

No comments:

Post a Comment