Hello :)
about the get set shortcut -
public int MyVar { get; set; }
for example
how it different from just:
public int MyVar;
???
i heard that in the shortcut it add private myVar... huh?? if i can't see it how can i use it?
when i use the previous system-
private int myVar;
public int MyVar
{
get {return myVar;}
set {myVar = value;}
}
i could use that to make things happen when i set the variable for example, like:
private int myVar;
public int MyVar
{
get {return myVar;}
set {MakeSomething(); myVar = value;}
}
and now i can't...
maybe i dont understand all the concept of those get/set
please help me understand that!!!
thank u :)