System.ComponentModel.PropertyDescriptorCollection.Sort C# (CSharp) Method

Sort() public method

public Sort ( ) : PropertyDescriptorCollection
return PropertyDescriptorCollection
        public virtual PropertyDescriptorCollection Sort() {
            return new PropertyDescriptorCollection(this.properties, this.propCount, this.namedSort, this.comparer);
        }
        

Same methods

PropertyDescriptorCollection::Sort ( IComparer comparer ) : PropertyDescriptorCollection
PropertyDescriptorCollection::Sort ( string names ) : PropertyDescriptorCollection
PropertyDescriptorCollection::Sort ( string names, IComparer comparer ) : PropertyDescriptorCollection

Usage Example

 public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
 {
     PropertyDescriptorCollection descriptors = new PropertyDescriptorCollection(null);
     descriptors.Add(new RuleConditionReferenceNamePropertyDescriptor(context, TypeDescriptor.CreateProperty(typeof(RuleConditionReference), "ConditionName", typeof(string), new Attribute[] { new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Content), DesignOnlyAttribute.Yes })));
     descriptors.Add(new RuleConditionReferencePropertyDescriptor(context, TypeDescriptor.CreateProperty(typeof(RuleConditionReference), "Expression", typeof(CodeExpression), new Attribute[] { new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Content), DesignOnlyAttribute.Yes })));
     return descriptors.Sort(new string[] { "ConditionName", "Expression" });
 }
All Usage Examples Of System.ComponentModel.PropertyDescriptorCollection::Sort