public virtual PropertyDescriptorCollection GetProperties (Attribute[] arr) { PropertyDescriptorCollection props = TypeDescriptor.GetProperties (this, arr, true); PropertyDescriptor[] newProps = new PropertyDescriptor [props.Count]; for (int n=0; n<props.Count; n++) { PropertyDescriptor prop = props [n]; Attribute[] atts = GetCustomAttributes (prop.Name); if (atts != null) newProps [n] = new CustomProperty (prop, atts); else newProps [n] = prop; } return new PropertyDescriptorCollection (newProps); }