MethodBuilder.GetGenericArguments Method

Definition

Returns an array of GenericTypeParameterBuilder objects that represent the type parameters of the method, if it is generic.

C#
public override Type[] GetGenericArguments();

Returns

Type[]

An array of GenericTypeParameterBuilder objects representing the type parameters, if the method is generic, or null if the method is not generic.

Remarks

The type parameters of a generic method also are returned by the DefineGenericParameters method that is used to define them.

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

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1

See also