Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

MemberDescriptor Class

Represents a class member, such as a property or event. This is an abstract base class.

Namespace:  System.ComponentModel
Assembly:  System (in System.dll)
[ComVisibleAttribute(true)]
[HostProtectionAttribute(SecurityAction.LinkDemand, SharedState = true)]
public abstract class MemberDescriptor

The MemberDescriptor type exposes the following members.

  NameDescription
Protected methodSupported by the XNA FrameworkMemberDescriptor(MemberDescriptor)Initializes a new instance of the MemberDescriptor class with the specified MemberDescriptor.
Protected methodMemberDescriptor(String)Initializes a new instance of the MemberDescriptor class with the specified name of the member.
Protected methodSupported by the XNA FrameworkMemberDescriptor(MemberDescriptor, Attribute[])Initializes a new instance of the MemberDescriptor class with the name in the specified MemberDescriptor and the attributes in both the old MemberDescriptor and the Attribute array.
Protected methodSupported by the XNA FrameworkMemberDescriptor(String, Attribute[])Initializes a new instance of the MemberDescriptor class with the specified name of the member and an array of attributes.
Top
  NameDescription
Protected propertySupported by the XNA FrameworkAttributeArrayGets or sets an array of attributes.
Public propertyAttributesGets the collection of attributes for this member.
Public propertyCategoryGets the name of the category to which the member belongs, as specified in the CategoryAttribute.
Public propertyDescriptionGets the description of the member, as specified in the DescriptionAttribute.
Public propertyDesignTimeOnlyGets whether this member should be set only at design time, as specified in the DesignOnlyAttribute.
Public propertySupported by the XNA FrameworkDisplayNameGets the name that can be displayed in a window, such as a Properties window.
Public propertyIsBrowsableGets a value indicating whether the member is browsable, as specified in the BrowsableAttribute.
Public propertySupported by the XNA FrameworkNameGets the name of the member.
Protected propertySupported by the XNA FrameworkNameHashCodeGets the hash code for the name of the member, as specified in GetHashCode.
Top
  NameDescription
Protected methodSupported by the XNA FrameworkCreateAttributeCollectionCreates a collection of attributes using the array of attributes passed to the constructor.
Public methodSupported by the XNA FrameworkEqualsCompares this instance to the given object to see if they are equivalent. (Overrides Object.Equals(Object).)

In XNA Framework 3.0, this member is inherited from Object.Equals(Object).
Protected methodSupported by the XNA FrameworkFillAttributesWhen overridden in a derived class, adds the attributes of the inheriting class to the specified list of attributes in the parent class.
Protected methodSupported by the XNA FrameworkFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected methodStatic memberSupported by the XNA FrameworkFindMethod(Type, String, Type[], Type)Finds the given method through reflection, searching only for public methods.
Protected methodStatic memberSupported by the XNA FrameworkFindMethod(Type, String, Type[], Type, Boolean)Finds the given method through reflection, with an option to search only public methods.
Public methodSupported by the XNA FrameworkGetHashCodeReturns the hash code for this instance. (Overrides Object.GetHashCode().)
Protected methodGetInvocationTargetRetrieves the object that should be used during invocation of members.
Protected methodStatic memberGetInvokee Obsolete. Gets the component on which to invoke a method.
Protected methodStatic memberGetSiteGets a component site for the given component.
Public methodSupported by the XNA FrameworkGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by the XNA FrameworkMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by the XNA FrameworkToStringReturns a string that represents the current object. (Inherited from Object.)
Top

MemberDescriptor is the base class for the EventDescriptor and the PropertyDescriptor classes. The EventDescriptor class provides a description of an event, and the PropertyDescriptor class provides a description of a property.

This class defines properties and methods to access its stored attributes. The Attributes property gets the collection of attributes. The Category, IsBrowsable, Description, and DesignTimeOnly properties retrieve the values of those specific attributes. The Name and DisplayName properties provide the name of the member.

The MemberDescriptor also defines an Equals method to compare this MemberDescriptor to another.

NoteNote

Typically, you inherit from the EventDescriptor and PropertyDescriptor classes, and not from this class.

NoteNote

The HostProtectionAttribute attribute applied to this type or member has the following Resources property value: SharedState. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.

Since most of the usage of this class will fall on the inherited classes EventDescriptor and PropertyDescriptor, refer to the examples in these classes.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.