MethodBuilder.GetCustomAttributes 方法

定義

回傳此方法定義的自訂屬性。

多載

名稱 Description
GetCustomAttributes(Type, Boolean)

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

GetCustomAttributes(Boolean)

會回傳此方法所有自訂屬性。

GetCustomAttributes(Type, Boolean)

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

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

例外狀況

適用於

GetCustomAttributes(Boolean)

會回傳此方法所有自訂屬性。

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[]

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

例外狀況

適用於