"Use camelCasing when declaring local variables / a parameter."
Camel Case convention is used to capitalize some kind of identifiers in C#. In Camel Case capitalization, the first letter of an identifier is lowercase and the first letter of each subsequent concatenated word is capitalized.
Camel Casing is used for these identifiers :
- Parameters
- Local variables
- Class fields (only where a property or method already exists with the Pascal Cased version of that name)
void Foo(int Bar)
{
...
}should be 🡻
void Foo(int bar)
{
...
}void Foo()
{
int LocalBar = 3;
...
}should be 🡻
void Foo()
{
int localBar = 3;
...
}int _Foo;
public int Foo
{
get => _Foo;
set => _Foo = value;
}should be 🡻
int foo;
public int Foo
{
get => foo;
set => foo = value;
}