다음을 통해 공유


MethodBuilder.GetGenericMethodDefinition Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Returns this method.

Namespace:  System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Overrides Function GetGenericMethodDefinition As MethodInfo
public override MethodInfo GetGenericMethodDefinition()

Return Value

Type: System.Reflection.MethodInfo
The current instance of MethodBuilder.

Exceptions

Exception Condition
InvalidOperationException

The current method is not generic. That is, the IsGenericMethod property returns false.

Remarks

A MethodBuilder cannot be used to emit a constructed generic method directly. The emitted method is a generic method definition.

For more information, see MethodInfo.IsGenericMethod and MethodInfo.GetGenericMethodDefinition. For information on generic types, see Type.IsGenericType.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.