Why are we able to write
public int RetInt
{
get;set;
}
instead of
public int RetInt
{
get{return someInt;}set{someI
How are these two different ?
There are different at least by 2 points:
someInt in your case)set/get modifiers, instead in auto property can not do that. In other words: if you need "just property", use auto-properties, if you need more control over workflow (raise an event on set, debug, run other stuff inside), use "normal" properties.