March 2003
Intermediate to advanced
896 pages
32h 35m
English
AttributeCollection
This class, used by the TypeDescriptor.GetAttributes( ) method, represents a collection of
Attribute objects.
In addition to the basic collection functionality, you can use the
Contains() method to determine whether a
particular attribute or array of attributes is represented in the
collection. Alternatively, you can use the
Matches() method to determine whether the
collection contains attributes with exactly matching attribute data.
public class AttributeCollection : ICollection, IEnumerable { // Public Constructors public AttributeCollection(Attribute[] attributes); // Public Static Fields public static readonly AttributeCollection Empty; // =System.ComponentModel.AttributeCollection // Public Instance Properties public int Count{get; } // implements ICollection public virtual Attribute this{get; } public virtual Attribute this{get; } // Public Instance Methods public bool Contains(Attribute attribute); public bool Contains(Attribute[] attributes); public void CopyTo(Array array, int index); // implements ICollection public IEnumerator GetEnumerator(); // implements IEnumerable public bool Matches(Attribute attribute); public bool Matches(Attribute[] attributes); // Protected Instance Methods protected Attribute GetDefaultAttribute(Type attributeType); }
IComNativeDescriptorHandler.GetAttributes(),
ICustomTypeDescriptor.GetAttributes(),
MemberDescriptor.{Attributes,
CreateAttributeCollection()},
TypeDescriptor.GetAttributes(),
System.Windows.Forms.PropertyGrid.BrowsableAttributes ...
Read now
Unlock full access