Pascal Case | Camel Case | Snake Case | Lower Case | Caps Case |
---|---|---|---|---|
LazyDogBrownFox | lazyDogBrownFox | lazy_dog_brown_fox | lazydogbrownfox | LAZYDOGBROWNFOX |
- Pascal Case.
MotorControl.cs
- Pascal Case: Names of classes, enumerations, namespaces
- Interface names are recommended to start with "I".
public class MyClass {}
namespace MyNamespace {}
public enum MyEnum {}
public interface IMyInterface {}
- Pascal Case.
public int RandomFunctionGenerator();
- Pascal Case: If field is a public field, static, or constant.
- Camel Case: If local variable or parameter.
- Camel case with a leading underscore: If private, protected, internal fields and properties.
public class MyClass {
public int MyPublicVariable = 0;
public static bool IsConnectionOpen = false;
private bool _myPrivateVariable = false;
public int MyMethodNameHere(int valueReturned) {
var myLocalVariable = "example";
return valueReturned;
}
}
For more standards and links refer to Coding Standards Lookup page.
To contribute refer to the Contributing and License pages.