Skip to content

Instantly share code, notes, and snippets.

@ScottLilly
Last active February 26, 2018 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ScottLilly/df856e1a04efa48ae4b83f3f7b27a73d to your computer and use it in GitHub Desktop.
Save ScottLilly/df856e1a04efa48ae4b83f3f7b27a73d to your computer and use it in GitHub Desktop.
Variables, fields, and properties
void Main()
{
private int _classLevelVariable;
public int Field; // Although, I would really only make a public field for a constant
public int Property { get; set; }
public void MyFunction()
{
_classLevelVariable = 1;
Field = 2;
Property = 3;
int methodLevelVariable = 4;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment