public PropertyDescriptorCollection GetProperties(Attribute[] attributes) { PropertyDescriptor[] newProps = new PropertyDescriptor[this.Count]; for (int i = 0; i < this.Count; i++) { CustomProperty prop = (CustomProperty)this[i]; newProps[i] = new CustomPropertyDescriptor(ref prop, attributes); } return(new PropertyDescriptorCollection(newProps)); }
public PropertyDescriptorCollection GetProperties(Attribute[] attributes) { PropertyDescriptor[] newProps = new PropertyDescriptor[this.Count]; for (int i = 0; i < this.Count; i++) { object obj = this[i]; CustomProperty prop = obj as CustomProperty; if (prop != null) { newProps[i] = new CustomPropertyDescriptor(ref prop, attributes); } else { } } return(new PropertyDescriptorCollection(newProps)); }