Skip to content
| Marketplace
Sign in
Visual Studio>Tools>Coding Guidelines
Coding Guidelines

Coding Guidelines

Samir Hafez

|
1,530 installs
| (0) | Free
C# Coding guidelines
Download

UPDATE: This extension will cease to exist and give place to a nuget package instead.

Get it at:

https://www.nuget.org/packages/CodingGuidelines

  And as always, give a helping hand at github:

https://github.com/SamirHafez/CSharpCodingGuidelines

  


Coding guidelines tries to follow Coding Guidelines for C# ( http://csharpguidelines.codeplex.com )
It is a beta version that includes the following Maintainability guidelines:
  • AV1570: Always check the result of an as operation;
  • AV1564: Avoid methods that take a bool flag;
  • AV1561: Don't allow methods and constructors with more than three parameters;
  • AV1545: Don't use if-else statements instead of a simple (conditional) assignment;
  • AV1540: Be reluctant with multiple return statements;
  • AV1532: Avoid nested loops;
  • AV1525: Don't make explicit comparisons to true or false;
  • AV1520: Only use var when the type is very obvious;
  • AV1502: Avoid conditions with double negatives;
  • AV1500: Methods should not exceed 7 statements.

It is still a work in progress but the good news is:

You can contribute via the github public repository ( http://github.com/SamirHafez/CSharpCodingGuidelines ).

Feel free to add guidelines, code fixes, or even test cases.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft