Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Ty masz tak
- public int Index;
- public int GetIndex()
- {
- return Index;
- }
- //A mógłbyś użyć get/set, czytelniejszy kod i możesz robić sobie "zebezpieczenia" przed zwracaniem jakiś indexów, zapobiegać ustawianiu //jako index nieporządanych liczb (wtedy wyrzucasz Exception) itd.
- public int _index;
- public int Index
- {
- get
- {
- return this._index;
- }
- set
- {
- this._index = value;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement