I have an object model that has the following property:
public class SomeModel
{
public string SomeString { get; set; }
public void DoSomeWork()
{
....
}
}
I want the function to DoSomeWorkexecute automatically after changing the property SomeString. I tried this, but it does not work:
public string SomeString { get; set { DoSomeWork(); } }
What is the correct syntax?
source
share