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

  • DeclaringType
    Gets the Type that declares the member.
    Type
  • IsAbstract
    Gets a value indicating whether the member is abstract.
    Boolean
  • IsAssembly
    Gets a value indicating whether the member is an assembly.
    Boolean
  • IsConstructor
    Gets a value indicating whether the member is a constructor.
    Boolean
  • IsFamily
    Gets a value indicating whether the member is only accessible within the scope of its defining class and by derived classes.
    Boolean
  • IsFamilyAndAssembly
    Gets a value indicating whether the member is accessible by derived classes and by all assemblies.
    Boolean
  • IsFamilyOrAssembly
    Gets a value indicating whether the member is accessible by derived classes and by all assemblies.
    Boolean
  • IsFinal
    Gets a value indicating whether the member is declared as final.
    Boolean
  • IsHideBySig
    Gets a value indicating whether the member is hidden by signature.
    Boolean
  • IsSpecialName
    Gets a value indicating whether the member has a special name.
    Boolean
  • IsStatic
    Gets a value indicating whether the member is static.
    Boolean
  • IsVirtual
    Gets a value indicating whether the member is virtual.
    Boolean
  • MemberType
    Gets the type of the member.
    MemberTypes
  • MetadataToken
    Gets the metadata token for the current `MemberInfo`.
    Int32
  • Name
    Gets the name of the current member.
    String
  • ReflectedType
    Gets the Type object that was used for the late-bound access.
    Type
  • Module
    Gets 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: obj
    Boolean
  • GetCustomAttributes(Boolean inherit)
    When overridden in a derived class, returns an array of custom attributes applied to this member.
    Parameters: inherit
    Object[]
  • GetCustomAttributes(Type attributeType, Boolean inherit)
    When overridden in a derived class, searches for the specified custom attribute and returns it.
    Parameters: attributeType, inherit
    Object[]
  • 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: bindingAttr
    MemberInfo[]
  • 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, inherit
    Boolean
  • ToString()
    Returns a string that represents the current object.
    String

Inheritance

  • Object
  • MemberInfo