static public DebugType Create(Process process, ICorDebugClass corClass, params ICorDebugType[] typeArguments)
        {
            MetaData metaData = process.GetModule(corClass.Module).MetaData;

            bool isValueType     = false;
            uint superClassToken = metaData.GetTypeDefProps(corClass.Token).SuperClassToken;

            if ((superClassToken & 0xFF000000) == 0x02000000)               // TypeDef
            {
                if (metaData.GetTypeDefProps(superClassToken).Name == "System.ValueType")
                {
                    isValueType = true;
                }
            }
            if ((superClassToken & 0xFF000000) == 0x01000000)               // TypeRef
            {
                if (metaData.GetTypeRefProps(superClassToken).Name == "System.ValueType")
                {
                    isValueType = true;
                }
            }

            int getArgsCount = metaData.GetGenericParamCount(corClass.Token);

            Array.Resize(ref typeArguments, getArgsCount);
            ICorDebugType corType = corClass.CastTo <ICorDebugClass2>().GetParameterizedType(
                isValueType ? (uint)CorElementType.VALUETYPE : (uint)CorElementType.CLASS,
                typeArguments
                );

            return(Create(process, corType));
        }
        DebugType(Process process, ICorDebugType corType)
        {
            if (corType == null)
            {
                throw new ArgumentNullException("corType");
            }

            this.process        = process;
            this.corType        = corType;
            this.corElementType = (CorElementType)corType.Type;

            if (this.IsClass || this.IsValueType)
            {
                this.corClass   = corType.Class;
                this.module     = process.GetModule(corClass.Module);
                this.classProps = module.MetaData.GetTypeDefProps(corClass.Token);
            }

            if (this.IsClass || this.IsValueType || this.IsArray || this.IsPointer)
            {
                foreach (ICorDebugType t in corType.EnumerateTypeParameters().Enumerator)
                {
                    typeArguments.Add(DebugType.Create(process, t));
                }
            }

            this.fullName = GetFullName();
        }