ICorDebugType::EnumerateTypeParameters Method
Gets an interface pointer to an ICorDebugTypeEnum that contains the Type parameters of the class referenced by this ICorDebugType.
Syntax
HRESULT EnumerateTypeParameters (
[out] ICorDebugTypeEnum **ppTyParEnum
);
Parameters
ppTyParEnum
[out] A pointer to the address of an ICorDebugTypeEnum
that contains the parameters of the type.
Remarks
You can use EnumerateTypeParameters
if the CorElementType value returned by ICorDebugType::GetType is ELEMENT_TYPE_CLASS, ELEMENT_TYPE_VALUETYPE, ELEMENT_TYPE_ARRAY, ELEMENT_TYPE_SZARRAY, ELEMENT_TYPE_BYREF, ELEMENT_TYPE_PTR, or ELEMENT_TYPE_FNPTR. The number of parameters and their order depends on the type:
ELEMENT_TYPE_CLASS or ELEMENT_TYPE_VALUETYPE: The number of type parameters contained in the
ICorDebugTypeEnum
that this method returns, will depend on the number of formal type parameters for the corresponding class. For example, if the type isclass Dict<String,int32>
, thenEnumerateTypeParameters
will return anICorDebugTypeEnum
that contains objects representingString
andint32
in sequence.ELEMENT_TYPE_FNPTR: The number of type parameters contained in the
ICorDebugTypeEnum
will be one greater than the number of arguments accepted by the function. The first type parameter contained in theICorDebugTypeEnum
is the return type for the function, and the subsequent type parameters are the function's parameters.ELEMENT_TYPE_ARRAY, ELEMENT_TYPE_SZARRAY, ELEMENT_TYPE_BYREF, or ELEMENT_TYPE_PTR: One type parameter will be returned. For example, if the type is an array type such as
int32[]
,EnumerateTypeParameters
will return anICorDebugTypeEnum
that contains an object representingint32
.
Requirements
Platforms: See System Requirements.
Header: CorDebug.idl, CorDebug.h
Library: CorGuids.lib
.NET Framework Versions: Available since 2.0
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for