Skip to main content
1 of 3
Ian
  • 4.6k
  • 21
  • 28

Firstly using

void MyFunc(BaseClass _myPara) { } 

Is clearly wrong! As a lot of coding standards use a “_” prefix on all field names! You code need to be easy to understand by other programmer so code should not be written in a way that will mislead a lot of C# programmers.

Given all the benefits of small methods, I personally don’t see any need for a naming convention to separate local variables from parameters. If you methods have so many parameters and local variables that you can’t tell what is going on without a naming convention you have bigger problems. (This is well covered in the Clean Code Book, a Java book but I still found it of great about as a C# programmer)

Ian
  • 4.6k
  • 21
  • 28