MethodBuilder.GetCustomAttributes 方法

定義

傳回為這個方法定義的自訂屬性。

多載

GetCustomAttributes(Boolean)

傳回為這個方法定義的所有自訂屬性。

GetCustomAttributes(Type, Boolean)

傳回指定類型所識別的自訂屬性。

GetCustomAttributes(Boolean)

來源:
MethodBuilder.cs

傳回為這個方法定義的所有自訂屬性。

public:
 override cli::array <System::Object ^> ^ GetCustomAttributes(bool inherit);
public override object[] GetCustomAttributes (bool inherit);
override this.GetCustomAttributes : bool -> obj[]
Public Overrides Function GetCustomAttributes (inherit As Boolean) As Object()

參數

inherit
Boolean

指定是否要搜尋這個成員的繼承鏈結以尋找自訂屬性。

傳回

Object[]

傳回代表這個方法的所有自訂屬性的物件陣列。

例外狀況

適用於

GetCustomAttributes(Type, Boolean)

來源:
MethodBuilder.cs

傳回指定類型所識別的自訂屬性。

public:
 override cli::array <System::Object ^> ^ GetCustomAttributes(Type ^ attributeType, bool inherit);
public override object[] GetCustomAttributes (Type attributeType, bool inherit);
override this.GetCustomAttributes : Type * bool -> obj[]
Public Overrides Function GetCustomAttributes (attributeType As Type, inherit As Boolean) As Object()

參數

attributeType
Type

自訂屬性類型。

inherit
Boolean

指定是否要搜尋這個成員的繼承鏈結以尋找自訂屬性。

傳回

Object[]

傳回物件陣列,代表這個方法之屬性的類型為 attributeType

例外狀況

適用於