14.6. C# Naming Conventions¶
C# has some very straightforward naming conventions. These are universally used by C# programmers, and differ in some cases from conventions commonly used in Python or other languages.
Again, these are conventions. Not following them will not prevent your code from running, as long as you are following C#’s naming rules.
|Method parameters, local variables, and fields||Start with a lowercase letter and use camelCase||
|Methods, properties, and class names||Start with an uppercase letter and capitalize each word; do not use hyphens or underscores (aka PascalCase)||
Microsoft provides some more detailed naming conventions. (From the date on this article, you’ll note that these have been relatively standard for a very long time!)