TypeBuilder.DeclaringMethod 屬性

定義

取得宣告目前泛型型別參數的方法。Gets the method that declared the current generic type parameter.

public:
 virtual property System::Reflection::MethodBase ^ DeclaringMethod { System::Reflection::MethodBase ^ get(); };
public override System.Reflection.MethodBase? DeclaringMethod { get; }
public override System.Reflection.MethodBase DeclaringMethod { get; }
member this.DeclaringMethod : System.Reflection.MethodBase
Public Overrides ReadOnly Property DeclaringMethod As MethodBase

屬性值

MethodBase

如果目前的類型是泛型類型參數,MethodBase 表示宣告目前類型的方法;否則為 nullA MethodBase that represents the method that declared the current type, if the current type is a generic type parameter; otherwise, null.

備註

注意

發出程式碼時,泛型型別參數是由物件表示, GenericTypeParameterBuilder 而不是由 TypeBuilder 物件表示。When emitting code, a generic type parameter is represented by a GenericTypeParameterBuilder object rather than by a TypeBuilder object.

適用於