MemberInfo Class
Namespace: System.Reflection
Base Types: Object
Summary
Represents the common language runtime (CLR) metadata for a code element. This is an abstract class that is used to derive classes for properties, methods, events, and fields.
The MemberInfo class is the base class for all reflection information objects that represent members of a type.
Properties
-
DeclaringTypeGets the Type that declares the member.Type
-
IsAbstractGets a value indicating whether the member is abstract.Boolean
-
IsAssemblyGets a value indicating whether the member is an assembly.Boolean
-
IsConstructorGets a value indicating whether the member is a constructor.Boolean
-
IsFamilyGets a value indicating whether the member is only accessible within the scope of its defining class and by derived classes.Boolean
-
IsFamilyAndAssemblyGets a value indicating whether the member is accessible by derived classes and by all assemblies.Boolean
-
IsFamilyOrAssemblyGets a value indicating whether the member is accessible by derived classes and by all assemblies.Boolean
-
IsFinalGets a value indicating whether the member is declared as final.Boolean
-
IsHideBySigGets a value indicating whether the member is hidden by signature.Boolean
-
IsSpecialNameGets a value indicating whether the member has a special name.Boolean
-
IsStaticGets a value indicating whether the member is static.Boolean
-
IsVirtualGets a value indicating whether the member is virtual.Boolean
-
MemberTypeGets the type of the member.MemberTypes
-
MetadataTokenGets the metadata token for the current `MemberInfo`.Int32
-
NameGets the name of the current member.String
-
ReflectedTypeGets the Type object that was used for the late-bound access.Type
-
ModuleGets the `Module` in which the source code that contains this member was compiled.Module
Methods
-
Equals(Object obj)Determines whether the specified object is equal to the current object.Parameters: objBoolean
-
GetCustomAttributes(Boolean inherit)When overridden in a derived class, returns an array of custom attributes applied to this member.Parameters: inheritObject[]
-
GetCustomAttributes(Type attributeType, Boolean inherit)When overridden in a derived class, searches for the specified custom attribute and returns it.Parameters: attributeType, inheritObject[]
-
GetHashCode()Serves as the default hash function.Int32
-
GetMembers(BindingFlags bindingAttr)When overridden in a derived class, returns an array of MemberInfo objects that represent public members and nested types.Parameters: bindingAttrMemberInfo[]
-
GetType()Gets the Type of the current instance.Type
-
IsDefined(Type attributeType, Boolean inherit)Indicates whether an attribute of the specified type is applied to this member.Parameters: attributeType, inheritBoolean
-
ToString()Returns a string that represents the current object.String
Inheritance
-
Object
-
MemberInfo