+
+
+ // GetProperties should return only the last type's implementation of a
+ // property with a matching name in the base types. E.g in the case where
+ // the "new" keyword is used.
+ //
+ PropertyDescriptorCollection derivedCol = TypeDescriptor.GetProperties (typeof(MyDerivedComponent));
+ Assert.IsNotNull (derivedCol["AnotherProperty"].Attributes[typeof (DescriptionAttribute)], "#G1");
+ int propsFound = 0;
+ foreach (PropertyDescriptor props in derivedCol)
+ if (props.Name == "AnotherProperty")
+ propsFound++;
+ Assert.AreEqual (1, propsFound, "#G2");