I have a property which is currently automatic.
public string MyProperty { get; set; }
However, I now need it to perform some action every
You need to either provide a body for both the getter and setter, or neither.
So if you define either one, it's no longer an auto property.
So you have to do:
Either
public string MyProperty {
get;
set;
}// Automatic property, no implementation
OR
public string MyProperty
{
get { return mMyProperty; }
set
{
mMyProperty = value;
PerformSomeAction();
}
}