Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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