Name

MemberDescriptor

Synopsis

This is the abstract base for classes that represent the member of class, such as properties and events (e.g., PropertyDescriptor and EventDescriptor). You can get the Name and DisplayName of the member.

In addition, you can get the collection of Attributes adorning the member. It also provides a set of utility accessors that indicate the values of particular attribute types: the Category, Description, DesignTimeOnly, and IsBrowsable members.


public abstract class MemberDescriptor {

// Protected Constructors

   protected MemberDescriptor(MemberDescriptor descr);

   protected MemberDescriptor(MemberDescriptor oldMemberDescriptor, Attribute[] newAttributes);

   protected MemberDescriptor(string name);

   protected MemberDescriptor(string name, Attribute[] attributes);

// Public Instance Properties

   public virtual AttributeCollection Attributes{get; }

   public virtual string Category{get; }

   public virtual string Description{get; }

   public virtual bool DesignTimeOnly{get; }

   public virtual string DisplayName{get; }

   public virtual bool IsBrowsable{get; }

   public virtual string Name{get; }

// Protected Instance Properties

   protected virtual Attribute[] AttributeArray{set; get; }

   protected virtual int NameHashCode{get; }

// Protected Static Methods

   protected static MethodInfo FindMethod(Type componentClass, string name, Type[] args, Type returnType);

   protected static MethodInfo FindMethod(Type componentClass, string name, Type[] args, Type returnType, 

         bool publicOnly); protected ...

Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.