示例#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);
			}
		}