Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IMetaDataEmit2::DefineGenericParam Method

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

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


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


[in] The index of the generic parameter.


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


[in] The name of the parameter.


[in] This parameter is reserved for future extensibility.


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


[out] A token that represents the generic parameter.

Platforms: See .NET Framework System Requirements.

Header: Cor.h

Library: Used as a resource in MsCorEE.dll

.NET Framework Versions: 4.6, 4.5.2, 4.5.1, 4.5, 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0

© 2015 Microsoft