Suppose this:
class BaseClass
{
public string MyProperty { get; set; }
public NestedClass_ NestedClass;
internal class NestedClass_ : BaseClass
{
public string MyNestedProperty { get; set; }
}
}
Now, let’s say this:
var baseClass = new BaseClass();
baseClass.NestedClass.MyNestedProperty = "Value applied from nested class";
Can something be done to apply the same value to baseClass.MyProperty when changing baseClass.NestedClass.MyNestedProperty?
And what about the oposite case:
var baseClass = new BaseClass();
baseClass.MyProperty = "Value applied from base class";
Can something be done to apply the same value to baseClass.NestedClass.MyNestedProperty when changing baseClass.MyProperty?
Found a way…