Пример #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);
            }
        }
Пример #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);
			}
		}