ICorDebugType

更新:2007 年 11 月

表示基本类型或复杂类型(即用户定义的类型)。如果该类型为泛型类型,则 ICorDebugType 将表示实例化的泛型类型。

interface ICorDebugType : IUnknown {
        
    HRESULT EnumerateTypeParameters (
        [out] ICorDebugTypeEnum  **ppTyParEnum
    );
        
    HRESULT GetBase (
        [out] ICorDebugType      **pBase
    );
        
    HRESULT GetClass (
        [out] ICorDebugClass     **ppClass
    );
        
    HRESULT GetFirstTypeParameter (
        [out] ICorDebugType      **value
    );
        
    HRESULT GetRank (
        [out] ULONG32            *pnRank
    );
        
    HRESULT GetStaticFieldValue (
        [in] mdFieldDef          fieldDef,
        [in] ICorDebugFrame      *pFrame,
        [out] ICorDebugValue     **ppValue
    );
        
    HRESULT GetType (
        [out] CorElementType     *ty
    );
        
};

方法

方法

说明

ICorDebugType::EnumerateTypeParameters 方法

获取一个接口指针,该指针所指向的 ICorDebugTypeEnum 引用此 ICorDebugType 所引用的类的泛型 Type 参数。

ICorDebugType::GetBase 方法

获取一个指向 ICorDebugType 的接口指针,该指针引用由此 ICorDebugType 所引用类的基类(如果存在)。

ICorDebugType::GetClass 方法

获取一个接口指针,该指针指向引用此 ICorDebugType 类型化构造函数的 ICorDebugClass

ICorDebugType::GetFirstTypeParameter 方法

获取一个指向 ICorDebugType 的接口指针,该指针引用类构造函数的第一个泛型 Type 参数,该类又由此 ICorDebugType 所引用。

ICorDebugType::GetRank 方法

获取数组类型的维数。

ICorDebugType::GetStaticFieldValue 方法

获取指向包含静态字段值的 ICorDebugValue 的接口指针,此静态字段由指定堆栈帧中的指定字段标记所引用。

ICorDebugType::GetType 方法

获取一个 CorElementType 值,该值描述此 ICorDebugType 引用的公共语言运行库 Type 的本机类型。

备注

如果该类型为泛型,则 ICorDebugClass 表示未实例化的类型。ICorDebugType 接口表示实例化的泛型类型。例如,Hashtable<K, V> 将由 ICorDebugClass 表示,而 Hashtable<Int32, String> 将由 ICorDebugType 表示。

非泛型类型既可由 ICorDebugClass 表示,也可由 ICorDebugType 表示。后一个接口在 .NET Framework 2.0 版中引入,用来处理类型实例化。

要求

**平台:**请参见 .NET Framework 系统要求

**头文件:**CorDebug.idl

**库:**CorGuids.lib

**.NET Framework 版本:**3.5 SP1、3.5、3.0 SP1、3.0、2.0 SP1、2.0

请参见

其他资源

调试接口