I want to do this:
public Name
{
get;
set
{
dosomething();
??? = value
}
}
Is it possible to use the auto-generated private field?
Or is it required that I implement it this way:
private string name;
public string Name
{
get
{
return name;
}
set
{
dosomething();
name = value
}
}
Once you want to do anything custom in either the getter or the setter you cannot use auto properties anymore.