Freigeben über


IMetaDataEmit2::DefineGenericParam Method

Creates a definition for a generic type parameter, and gets a token to that generic type parameter.

HRESULT DefineGenericParam ( 
    mdToken         tk, 
    ULONG           ulParamSeq, 
    DWORD           dwParamFlags, 
    LPCWSTR         szname, 
    DWORD           reserved, 
    mdToken         rtkConstraints[], 
    mdGenericParam  *pgp
);

Parameters

Parameter Description

tk

[in] An mdTypeDef or mdMethodDef token that represents the method or constructor for which to define a generic parameter.

ulParamSeq

[in] The index of the generic parameter.

dwParamFlags

[in] A value of the CorGenericParamAttr Enumeration enumeration that describes the type for the generic parameter.

szname

[in] The name of the parameter.

reserved

[in] This parameter is reserved for future extensibility.

rtkConstraints

[in] A zero-terminated array of type constraints. Array members must be an mdTypeDef, mdTypeRef, or mdTypeSpec metadata token.

pgp

[out] A token that represents the generic parameter.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: Cor.h

Library: Used as a resource in Mscoree.dll

.NET Framework Version: 2.0

See Also

Reference

IMetaDataEmit2 Interface
IMetaDataEmit Interface