MemberInfo

MemberInfo CF 1.0, ECMA 1.0, serializable

System.Reflection (mscorlib.dll) abstract class

This class is the base type for all reflective types defined in the .NET environment; it defines the basic data associated with any member (field, method, property, event, nested type) of a given type. Note that even System.Type itself inherits from this class.

By itself, MemberInfo is a fairly simple type. It consists of four properties: DeclaringType (a reference to the System.Type in which this member was declared, which might be a base type to the class being reflected over), MemberType (an enumeration describing the type of the member), Name , and ReflectedType (the System.Type instance from which this MemberInfo object was received in the first place). MemberInfo also consists of two methods , GetCustomAttributes( ) and IsDefined( ) , both of which deal with any custom attributes defined on this member.

 public abstract class  MemberInfo  : ICustomAttributeProvider {  // Protected Constructors  protected  MemberInfo  ( );  // Public Instance Properties  public abstract Type  DeclaringType  {get; }    public abstract MemberTypes  MemberType  {get; }    public abstract string  Name  {get; }    public abstract Type  ReflectedType  {get; }  // Public Instance Methods  public abstract object[ ]  GetCustomAttributes  ( bool   inherit   );  // implements ICustomAttributeProvider  public abstract object[ ]  GetCustomAttributes  (Type   attributeType   , bool   inherit   )  // implements ICustomAttributeProvider  public abstract bool  IsDefined  (Type   attributeType   , bool   inherit   )  // implements ICustomAttributeProvider  } 

Subclasses

EventInfo , FieldInfo , MethodBase , PropertyInfo , System.Type

Returned By

IReflect.{GetMember( ) , GetMembers( )} , ParameterInfo.Member , System.Runtime.InteropServices.Marshal.GetMethodInfoForComSlot( ) , System.Runtime.Serialization.FormatterServices.GetSerializableMembers( ) , System.Type.{FindMembers( ) , GetDefaultMembers( ) , GetMember( ) , GetMembers( )}

Passed To

System.Attribute.{GetCustomAttribute( ) , GetCustomAttributes( ) , IsDefined( )} , MemberFilter.{BeginInvoke( ) , Invoke( )} , System.Runtime.InteropServices.Expando.IExpando.RemoveMember( ) , System.Runtime.InteropServices.Marshal.GetComSlotForMethodInfo( ) , System.Runtime.Serialization.FormatterServices.{GetObjectData( ) , PopulateObjectMembers( )} , System.Runtime.Serialization.ObjectManager.{RecordFixup( ) , RegisterObject( )}



C# in a Nutshell
C # in a Nutshell, Second Edition
ISBN: 0596005261
EAN: 2147483647
Year: 2005
Pages: 963

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net