-
-
Save ScottLilly/df856e1a04efa48ae4b83f3f7b27a73d to your computer and use it in GitHub Desktop.
Variables, fields, and properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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