Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
		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);
			}
		}