FieldBuilder.GetCustomAttributes 方法

定義

傳回為這個欄位定義的自訂屬性。

多載

GetCustomAttributes(Boolean)

傳回為這個欄位定義的所有自訂屬性。

GetCustomAttributes(Type, Boolean)

傳回為這個欄位定義的所有自訂屬性,這個欄位由指定型別所識別。

GetCustomAttributes(Boolean)

來源:
FieldBuilder.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[]

Object 型別的陣列,表示這個 FieldBuilder 執行個體所表示的建構函式的所有自訂屬性。

例外狀況

不支援這個方法。

適用於

GetCustomAttributes(Type, Boolean)

來源:
FieldBuilder.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[]

Object 型別的陣列,表示這個 FieldBuilder 執行個體所表示的建構函式的所有自訂屬性。

例外狀況

不支援這個方法。

適用於