Beispiel #1
0
        public void VirtualPropertyDontOverrideGetter()
        {
            VirtPropChildNoGetter        c   = new VirtPropChildNoGetter();
            PropertyDescriptorCollection pdc = TypeDescriptor.GetProperties(c);

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