1

Is there are any documents / articles on ASP.NET 4.0 Coding standards? It would be of great help to me, to increase the quality in my code and thus adhere to industry standards.

Thanks

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Dinny
  • 455
  • 2
  • 5
  • 17

4 Answers4

1

I found this documentation to be extremely useful and well made, with a cheatsheet too.

Matteo Mosca
  • 7,380
  • 4
  • 44
  • 80
1

Most companies are moving/have moved to using the Microsoft coding standards. As well as getting a well-thought out and very comprehensive set of standards, you get excellent tool support using FxCop and StyleCop.

While you can implement your own standards for these, it's rarely worth the effort to do anything more than supplement the default set of rules.

RB.
  • 36,301
  • 12
  • 91
  • 131
0

You got Design Guidelines for Developing Class Libraries at MSDN.

Don't be fooled by the name. I find then to be a really good set of guide lines that you should follow.

You could also installed StyleCop. Some of the guide lines are stupid (as forcing a worthless header or not letting you have _underScorePrefix for field names). The good thing is that you can turn of or customize rules.

jgauffin
  • 99,844
  • 45
  • 235
  • 372
0

From google:

Top 7 Coding Standards & Guideline Documents For C#/.NET Developers

Asken
  • 7,679
  • 10
  • 45
  • 77
  • 1
    First rule is pretty worthless and invites you to break Liskovs Substition Principle. If you find yourself needing to check if something implements an interface you've done something wrong. – jgauffin Dec 15 '11 at 09:08
  • @jgauffin: In real world actually you can receive `IPlugin` implementing the basic functions. Also it can implement say `ISearchPlugin` so the method given checks for that, and does something regarding this. – abatishchev Dec 15 '11 at 09:13
  • 1
    It does... however if you don't know what interface you'll have to check. What if the parameter of a function is an object. You'd never know if it has the interface if you don't check first. The well-knowns are picked up during complilation. – Asken Dec 15 '11 at 09:22