Skip to content

Instantly share code, notes, and snippets.

@zaverden
Last active June 10, 2017 16:08
Show Gist options
  • Save zaverden/f105fe54e86db5847b8782f49b9733b5 to your computer and use it in GitHub Desktop.
Save zaverden/f105fe54e86db5847b8782f49b9733b5 to your computer and use it in GitHub Desktop.
namespace MyProject.Models
{
public class MyModel // class: PascalCase
{
private readonly string _myField; // private field: _camelCaseWithPrefix
public MyModel(string defaultFieldValue) // param: camelCase
{
_myField = defaultFieldValue;
}
public string MyProperty => _myField; // property: PascalCase
public int GetSomeValue(int oneMoreParameter) // method: PascalCase, param: camelCase
{
int value = 42; // local variable: camelCase
return value % oneMoreParameter;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment