I have an object that contains a public Action to call an update method within another class, whenever a property changes in the first class. It looks something like this:
public class FirstClass {
public Action Update;
private string _description;
public string Description
{
get { return _description; }
set
{
if (_description == value) return;
_description = value;
Update();
}
}
}
There are about 30 different properties that this needs to be applied to. Is there a more efficient way to accomplish this?