Created
April 3, 2016 19:47
-
-
Save zs40x/e763c9f36796737036dc0bf6289af6ba to your computer and use it in GitHub Desktop.
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
public class Person | |
{ | |
// Example 1: manually implemented property | |
private string _name; | |
public string Name | |
{ | |
get | |
{ | |
return _name; | |
} | |
set | |
{ | |
_name = value; | |
} | |
} | |
// Example 2: auto-implemented property | |
public string City { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment