Edit

Share via


MethodBuilder.GetGenericMethodDefinition Method

Definition

Returns this method.

public:
 override System::Reflection::MethodInfo ^ GetGenericMethodDefinition();
public override System.Reflection.MethodInfo GetGenericMethodDefinition ();
override this.GetGenericMethodDefinition : unit -> System.Reflection.MethodInfo
Public Overrides Function GetGenericMethodDefinition () As MethodInfo

Returns

The current instance of MethodBuilder.

Exceptions

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 MethodBase.IsGenericMethod and MethodInfo.GetGenericMethodDefinition. For information on generic types, see Type.IsGenericType.

Applies to

See also