E.g. which way is better
class Foo {
private string _Bar ;
Foo ( string bar)
{
_Bar = bar ;
}
public string Bar
{
get { return _Bar ; //more logic here
}
set { _Bar = value ; //more logic could be added
}
}
}
OR
class Foo {
private string _Bar ;
Foo ( string bar)
{
this.Bar = bar ;
}
public string Bar {
get { return _Bar ; //more logic could be added }
set { _Bar = value ; //more logic could be added }}
}
Edit: I know that the latter allows to put some more logic in it , yet is it justifiable to use it because of it ...