There are many rules in the best practice of programming naming convention. I selected just a few, so it would be easier to remember and follow.
refer to C# Coding Conventions (C# Programming Guide) from Microsoft.
- Identifiers should have easily readible names. “FundingSource” instead of “SourceFunding”.
- Use CamelCase for fields and PascalCase for properties and methods.
- Use underscore prefix for class fields. to distinguish between private variables and local fields, I use “my” prefix for private variables.
- Note: MS recommends using “this.” to distinguish between private variables and local fields. No matter what other rules do you use, using c# “this.” or vb.net “me.” is a good habit.
Do not use in identiers:
- non-alphanumeric characters (like underscores), try not to use numbers
- Hungarian notation
- abbreviations or not widely accepted acronyms
- data type names
- names already used in Microsoft and other commonly used namespaces
Namespaces: (Company).(Product or Component).(Feature).(Sub-Feature)