Created
April 16, 2018 10:01
-
-
Save ecanuto/53a65bc4d871a328649d125dfb27edd8 to your computer and use it in GitHub Desktop.
Class property in C#
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 User { | |
private String name; | |
public string Name | |
{ | |
get { return name; } | |
set { name = value; } | |
} | |
} | |
User user = new User(); | |
user.name = "Joe Doe"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ou ainda, a versão curta: