Class MemberInfo
- Namespace
- System.Reflection
- Assembly
- mscorlib.dll
Obtains information about the attributes of a member and provides access to member metadata.
public abstract class MemberInfo
- Inheritance
-
MemberInfo
- Derived
- Inherited Members
- Extension Methods
Remarks
Available only in mscorlib build with support for System.Reflection.
Constructors
MemberInfo()
protected MemberInfo()
Properties
DeclaringType
Gets the class that declares this member.
public abstract Type DeclaringType { get; }
Property Value
- Type
The Type object for the class that declares this member.
MemberType
When overridden in a derived class, gets a MemberTypes value indicating the type of the member method, constructor, event, and so on.
public abstract MemberTypes MemberType { get; }
Property Value
- MemberTypes
A MemberTypes value indicating the type of member.
Name
Gets the name of the current member.
public abstract string Name { get; }
Property Value
- string
A String containing the name of this member.
Methods
GetCustomAttributes(bool)
When overridden in a derived class, returns an array of all custom attributes applied to this member.
public abstract object[] GetCustomAttributes(bool inherit)
Parameters
inherit
booltrue to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events.
Returns
- object[]
An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined.