다음을 통해 공유


IDebugGenericParamField::GetIndex

이 제네릭 매개 변수의 인덱스를 검색합니다.

HRESULT GetIndex(
   DWORD* pIndex
);
int GetIndex(
   out uint pIndex
);

매개 변수

  • pIndex
    [out] 인덱스 값이 제네릭 매개 변수입니다.

반환 값

성공 하면 반환 S_OK. 그렇지 않으면 오류 코드를 반환 합니다.

설명

예를 들어, Dictionary(K,V), K 0 인덱스에서 인덱스 1 V입니다.

예제

다음 예제에서는이 메서드를 구현 하는 방법을 보여 줍니다 있는 CDebugGenericParamFieldType 를 노출 하는 개체는 IDebugGenericParamField 인터페이스.

HRESULT CDebugGenericParamFieldType::GetIndex(DWORD* pIndex)
{
    HRESULT hr = S_OK;

    METHOD_ENTRY( CDebugGenericParamFieldType::GetIndex );

    IfFalseGo(pIndex, E_INVALIDARG );
    IfFailGo( this->LoadProps() );
    *pIndex = m_index;

Error:

    METHOD_EXIT( CDebugGenericParamFieldType::GetIndex, hr );
    return hr;
}

참고 항목

참조

IDebugGenericParamField