Skip to content

Instantly share code, notes, and snippets.

@jsauve
Last active August 29, 2015 14:05
Show Gist options
  • Save jsauve/7b4bb18797faa298be80 to your computer and use it in GitHub Desktop.
Save jsauve/7b4bb18797faa298be80 to your computer and use it in GitHub Desktop.
My C# coding standards
public class MyClass
{
private Object _Something;
public Object Something
{
get { return _Something; }
set { _Something = value; }
}
public void MyMethod (object myParam)
{
var _myLocalVar = new Object();
_myLocalVar.ToString (); // I know this is local to the method because it's underscore-prefixed camelCase
myParam.ToString (); // I know this is a param because it's camelCase
_Something.ToString (); // I know this is a class-level private field because it's underscore-prefixed PascalCase
Something.ToString (); // I know this is a public class-level member because it's PascalCase
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment