public void VirtualPropertyDontOverrideSetter() { VirtPropChildNoSetter c = new VirtPropChildNoSetter(); PropertyDescriptorCollection pdc = TypeDescriptor.GetProperties(c); foreach (PropertyDescriptor pd in pdc) { if (pd.Name != "SomeProperty") { continue; } pd.SetValue(c, "testing2"); pd.GetValue(c); } }
public void VirtualPropertyDontOverrideSetter () { VirtPropChildNoSetter c = new VirtPropChildNoSetter (); PropertyDescriptorCollection pdc = TypeDescriptor.GetProperties (c); foreach (PropertyDescriptor pd in pdc) { if (pd.Name != "SomeProperty") continue; pd.SetValue (c, "testing2"); pd.GetValue (c); } }