How to name Private Methods in C#?
I'm having a debate (with myself mostly) concerning the proper way to name private methods in C# projects.
For some forgotten reason, I have been accustomed to use camel casing when naming private methods - as opposed to using Pascal casing for public methods. Example:
private int getBlockInfo(int memberID) {...}
public int GetBlockInfo(int memberID) {...}
For me this seems very comfortable for differentiating between private "secret" methods within a class and public methods that are visible outside. This is similar in my mind to using camel case for private members while using Pascal case for matching public properties.
private int memberID;
public int MemberID { get { return memberID; } set { memberID = value; } }
Still, feeling somewhat insecure concerning the origin of this habit of mine, I consulted the C# "Naming Guidelines" document buried deep within the MSDN. To my surprise the "Method Naming Guidelines" sections ignored the issue of private vs public methods and instructed that all methods should be named in Pascal case.
There is not doubt in my mind that I should follow Microsoft naming guidelines at all times. And yet there's this nagging feeling that my current habit rises not from whim but from logic. I must've seen this convention somewhere and adopted it. Do any of you, my trusted readers, know where it came from?