TypeBuilder.DeclaringMethod 屬性

定義

取得宣告目前泛型型別參數的方法。

C#
public override System.Reflection.MethodBase? DeclaringMethod { get; }
C#
public override System.Reflection.MethodBase DeclaringMethod { get; }

屬性值

如果目前的類型是泛型類型參數,MethodBase 表示宣告目前類型的方法;否則為 null

備註

注意

發出程式代碼時,泛型型別參數是由物件TypeBuilder而非物件表示GenericTypeParameterBuilder

適用於

產品 版本
.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, 10
.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