Coding Standards

  • Thread starter Thread starter ganesan
  • Start date Start date
G

ganesan

Hi Guys,
Could any one knows the best coding standards styles(with variable
declarations for c#) . and if any links or site with the best coding
standards for .NET send me those links

regards
Ganesan
 
H Ganeshan,

Here are some best coding standards for variables, Data Types and constants..
1. Use the inbuilt data types of the language rather than the framework data
types
Eg: Use int (for C#) rather than Int32.
2. Use the simplest data type that can store u r value
3. Initialize variables when they are declared. This makes the code readable
and also shields you from changes to default values in the future version of
language. The .NET compiler optimizes this so that there is no performance
hit when you do this. ( For .NET 2.0 only)
4. Prefer generic types to base class based types ( In case u r coding in C#
2.0)

HTH,

Need any help, do post a msg back..


Happy Coding
 
Back
Top