1.7. 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 coding 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.

Identifier Type Convention Examples
Method parameters, local variables, and fields Start with a lowercase letter and use camelCase id, firstName
Methods, properties, and class names Start with an uppercase letter and capitalize each word; do not use hyphens or underscores (aka PascalCase) Program , HelloWorld, TempConv

Microsoft provides more detailed naming guidelines here.