Last active
December 17, 2015 19:29
-
-
Save ochilab/5660341 to your computer and use it in GitHub Desktop.
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
class Mark{ | |
private int x; | |
private int y; | |
public int X { | |
set { | |
this.x = value; | |
} | |
get { | |
return this.x; | |
} | |
} | |
public int Y { | |
set { | |
this.y = value; | |
} | |
get { | |
return this.y; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment