DekGenius.com
[ Team LiB ] Previous Section Next Section

TypeCF 1.0, ECMA 1.0, serializable

System (mscorlib.dll)abstract class

Type is an abstract base class that encapsulates the metadata for any .NET type. You can get a Type object by using the System.Object.GetType( ) method, which is inherited by all .NET types, or by the typeof operator in C#.

The Type is used most often for reflection. You can get a complete description of an object's metadata, including information about the constructors, methods, fields, properties, and events of a class, as well as the module and the assembly in which the class is deployed by using it. Do this by using the supplied Get methods, such as GetEvents( ) and GetConstructors( ), which return arrays of the appropriate System.Reflection class. You can also use the singular methods, such as GetEvent( ), to retrieve a single type object that matches specific criteria. Note that all members can be retrieved, including inherited, private, and protected members.

public abstract class Type : System.Reflection.MemberInfo, System.Reflection.IReflect {
// Protected Constructors
   protected Type( );
// Public Static Fields
   public static readonly char Delimiter;
// =0x0000002E
   public static readonly Type[ ] EmptyTypes; 
// =System.Type[ ]
   public static readonly MemberFilter FilterAttribute; 
// =System.Reflection.MemberFilter
   public static readonly MemberFilter FilterName;
// =System.Reflection.MemberFilter
   public static readonly MemberFilter FilterNameIgnoreCase;     
// =System.Reflection.MemberFilter
   public static readonly object Missing;
// =System.Reflection.Missing
// Public Static Properties
   public static Binder DefaultBinder{get; }
// Public Instance Properties
   public abstract Assembly Assembly{get; }
   public abstract string AssemblyQualifiedName{get; }
   public TypeAttributes Attributes{get; }
   public abstract Type BaseType{get; }
   public override Type DeclaringType{get; }          
// overrides System.Reflection.MemberInfo
   public abstract string FullName{get; }
   public abstract Guid GUID{get; }
   public bool HasElementType{get; }
   public bool IsAbstract{get; }
   public bool IsAnsiClass{get; }
   public bool IsArray{get; }
   public bool IsAutoClass{get; }
   public bool IsAutoLayout{get; }
   public bool IsByRef{get; }
   public bool IsClass{get; }
   public bool IsCOMObject{get; }
   public bool IsContextful{get; }
   public bool IsEnum{get; }
   public bool IsExplicitLayout{get; }
   public bool IsImport{get; }
   public bool IsInterface{get; }
   public bool IsLayoutSequential{get; }
   public bool IsMarshalByRef{get; }
   public bool IsNestedAssembly{get; }
   public bool IsNestedFamANDAssem{get; }
   public bool IsNestedFamily{get; }
   public bool IsNestedFamORAssem{get; }
   public bool IsNestedPrivate{get; }
   public bool IsNestedPublic{get; }
   public bool IsNotPublic{get; }
   public bool IsPointer{get; }
   public bool IsPrimitive{get; }
   public bool IsPublic{get; }
   public bool IsSealed{get; }
   public bool IsSerializable{get; }
   public bool IsSpecialName{get; }
   public bool IsUnicodeClass{get; }
   public bool IsValueType{get; }
   public override MemberTypes MemberType{get; }      
// overrides System.Reflection.MemberInfo
   public abstract Module Module{get; }
   public abstract string Namespace{get; }
   public override Type ReflectedType{get; }          
// overrides System.Reflection.MemberInfo
   public abstract RuntimeTypeHandle TypeHandle{get; }
   public ConstructorInfo TypeInitializer{get; }
   public abstract Type UnderlyingSystemType{get; }   
// implements System.Reflection.IReflect
// Public Static Methods
   public static Type GetType(string typeName);
   public static Type GetType(string typeName, bool throwOnError);
   public static Type GetType(string typeName, bool throwOnError, bool ignoreCase);
   public static Type[ ] GetTypeArray(object[ ] args);
   public static TypeCode GetTypeCode(Type type);
   public static Type GetTypeFromCLSID(Guid clsid);
   public static Type GetTypeFromCLSID(Guid clsid,  bool throwOnError);
   public static Type GetTypeFromCLSID(Guid clsid,  string server);
   public static Type GetTypeFromCLSID(Guid clsid, string server, bool throwOnError);
   public static Type GetTypeFromHandle(RuntimeTypeHandle handle);
   public static Type GetTypeFromProgID(string progID);
   public static Type GetTypeFromProgID(string progID, bool throwOnError);
   public static Type GetTypeFromProgID(string progID, string server);
   public static Type GetTypeFromProgID(string progID, string server, bool throwOnError);
   public static RuntimeTypeHandle GetTypeHandle(object o);
// Public Instance Methods
   public override bool Equals(object o);            
// overrides object
   public bool Equals(Type o);
   public virtual Type[ ] FindInterfaces(System.Reflection.TypeFilter filter, 
        object filterCriteria);
   public virtual MemberInfo[ ] FindMembers(System.Reflection.MemberTypes memberType,
        System.ReflectionSystemobject filterCriteria);.Reflection.MemberFilter filter,
        .BindingFlags bindingAttr,
   public virtual int GetArrayRank( );
   public ConstructorInfo GetConstructor(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder,
        Type[ System.Reflection.ParameterModifier[ ] modifiers); ] types, 
        System.Reflection.CallingConventions callConvention,
   public ConstructorInfo GetConstructor(System.Reflection.BindingFlags bindingAttr,
        System.Reflection.ParameterModifier[ ] modifiers); System.Reflection.Binder binder, 
        Type[ ] types,
   public ConstructorInfo GetConstructor(Type[ ] types);
   public ConstructorInfo[ ] GetConstructors( );
   public abstract ConstructorInfo[ ] GetConstructors(System.Reflection.BindingFlags bindingAttr);
   public virtual MemberInfo[ ] GetDefaultMembers( );
   public abstract Type GetElementType( );
   public EventInfo GetEvent(string name);
   public abstract EventInfo GetEvent(string name, System.Reflection.BindingFlags bindingAttr);
   public virtual EventInfo[ ] GetEvents( );
   public abstract EventInfo[ ] GetEvents(System.Reflection.BindingFlags bindingAttr);
   public FieldInfo GetField(string name);
   public abstract FieldInfo GetField(string name, System.Reflection.BindingFlags bindingAttr)
// implements System.Reflection.IReflect
   public FieldInfo[ ] GetFields( );
   public abstract FieldInfo[ ] GetFields(System.Reflection.BindingFlags bindingAttr)
// implements System.Reflection.IReflect
   public override int GetHashCode( );    
// overrides object
   public Type GetInterface(string name);
   public abstract Type GetInterface(string name, bool ignoreCase);
   public virtual InterfaceMapping GetInterfaceMap(Type interfaceType);
   public abstract Type[ ] GetInterfaces( );
   public MemberInfo[ ] GetMember(string name);
   public virtual MemberInfo[ ] GetMember(string name, System.Reflection.BindingFlags bindingAttr)
// implements System.Reflection.IReflect
   public virtual MemberInfo[ ] GetMember(string name, System.Reflection.MemberTypes type,
        System.Reflection.BindingFlags bindingAttr);
   public MemberInfo[ ] GetMembers( );
   public abstract MemberInfo[ ] GetMembers(System.Reflection.BindingFlags bindingAttr)
// implements System.Reflection.IReflect
   public MethodInfo GetMethod(string name);
   public MethodInfo GetMethod(string name, System.Reflection.BindingFlags bindingAttr)
// implements System.Reflection.IReflect

   public MethodInfo GetMethod(string name, System.Reflection.BindingFlags bindingAttr,
        System.Reflection.BinderSystem.Reflection.ParameterModifier[ ] modifiers); binder,Type[ ] types,
        System.Reflection.CallingConventions callConvention,
   public MethodInfo GetMethod(string name,  System.Reflection.BindingFlags bindingAttr,
System.Reflection.Binder binder, Type[ ] types, System.Reflection.ParameterModifier[ ] modifiers)
// implements System.Reflection.IReflect
   public MethodInfo GetMethod(string name, Type[ ] types);
   public MethodInfo GetMethod(string name, Type[ ] types, System.Reflection.ParameterModifier[ ] modifiers);
   public MethodInfo[ ] GetMethods( );
   public abstract MethodInfo[ ] GetMethods(System.Reflection.BindingFlags bindingAttr)
// implements System.Reflection.IReflect
   public Type GetNestedType(string name);
   public abstract Type GetNestedType(string name, System.Reflection.BindingFlags bindingAttr);
   public Type[ ] GetNestedTypes( );
   public abstract Type[ ] GetNestedTypes(System.Reflection.BindingFlags bindingAttr);
   public PropertyInfo[ ] GetProperties( );
  public abstract PropertyInfo[ ]GetProperties(System.Reflection.BindingFlags bindingAttr)
// implements System.Reflection.IReflect
   public PropertyInfo GetProperty(string name);
  public PropertyInfo GetProperty(string name,  System.Reflection.BindingFlags bindingAttr)
// implements System.Reflection.IReflect
   public PropertyInfo GetProperty(string name, System.Reflection.BindingFlags bindingAttr,
       System.Reflection.Binder binder, Type returnType, Type[ ] types,
       System.Reflection.ParameterModifier[ ] modifiers)
// implements System.Reflection.IReflect
   public PropertyInfo GetProperty(string name, Type returnType);
   public PropertyInfo GetProperty(string name, Type[ ] types);
   public PropertyInfo GetProperty(string name, Type returnType, Type[ ] types);
   public PropertyInfo GetProperty(string name, Type returnType, Type[ ] types,
         System.Reflection.ParameterModifier[ ] modifiers);
   public object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr,
        System.Reflection.Binder binder, object target, object[ ] args);
   public object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr,
        System.Reflection.Binder binder, object target, object[ ] args, 
        System.Globalization.CultureInfo culture);
   public abstract object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr,
          System.Reflection.Binder binder, object target,  object[ ] args, 
          System.Reflection.ParameterModifier[ ] modifiers System.Globalization.CultureInfo culture, string[ ] namedParameters)
// implements System.Reflection.IReflect
   public virtual bool IsAssignableFrom(Type c);
   public virtual bool IsInstanceOfType(object o);
   public virtual bool IsSubclassOf(Type c);
   public override string ToString( );    
// overrides object
// Protected Instance Methods
   protected abstract TypeAttributes GetAttributeFlagsImpl( );
   protected abstract ConstructorInfo GetConstructorImpl(System.Reflection.BindingFlags bindingAttr,
        System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, Type[ ] types,
        System.Reflection.ParameterModifier[ ] modifiers);
   protected abstract MethodInfo GetMethodImpl(string name,
        System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder,
       System.Reflection.CallingConventions callConvention, Type[ ] types, System.Reflection.ParameterModifier[ ] modifiers);
   protected abstract PropertyInfo GetPropertyImpl(string name, System.Reflection.BindingFlags bindingAttr,
        System.Reflection.Binder binder, Type returnType, Type[ ] types, System.Reflection.ParameterModifier[ ] modifiers);
   protected abstract bool HasElementTypeImpl( );
   protected abstract bool IsArrayImpl( );
   protected abstract bool IsByRefImpl( );
   protected abstract bool IsCOMObjectImpl( );
   protected virtual bool IsContextfulImpl( );
   protected virtual bool IsMarshalByRefImpl( );
   protected abstract bool IsPointerImpl( );
   protected abstract bool IsPrimitiveImpl( );
   protected virtual bool IsValueTypeImpl( );
}

Hierarchy

Object System.Reflection.MemberInfo(System.Reflection.ICustomAttributeProvider) Type(System.Reflection.IReflect)

Subclasses

System.Reflection.TypeDelegator, System.Reflection.Emit.{EnumBuilder, TypeBuilder}

Returned By

Multiple types

Passed To

Multiple types

    [ Team LiB ] Previous Section Next Section