C# .NET - About coding standards
Asked By lakshmi prasanna on 20-Feb-12 11:59 PM
Can Any one tell about coding standards and how to consume them in a project
muthuraman alexander replied to lakshmi prasanna on 21-Feb-12 12:11 AM
refer these links
Suchit shah replied to lakshmi prasanna on 21-Feb-12 02:24 AM
Mainly for the codeing standard you have to consider this thing mainly
1) Use proper naming convention and standards
2) Use proper spacing in code so anyone can see it clearly ( make practice to use the Region to clearly identify)
3) make practice to use the Comments for future use so anyone can easily understand your code
4) Avoid writing a very long method. if method is long then make it small small methods
5) use meaningful method names
6) Make practice to use the exception handling technicquis
7) Do not hardcode numbers. Use constants instead. Declare constant in the top of the file and use it in your code.
8)Do not hardcode strings. Use resource files.
9)Do not make the member variables public or protected. Keep them private and expose public/protected Properties.
10)Never hardcode a path or drive name in code. Get the application path programmatically and use relative path.
11)Do not have more than one class in a single file.
12)Always use multi layer (N-Tier) architecture.
Hope this few suggestion will helps to make your application better