AssemblyBuilder.GetCustomAttributes 方法

定義

傳回已套用至目前 AssemblyBuilder 的自訂屬性。

多載

GetCustomAttributes(Type, Boolean)

傳回已套用至目前 AssemblyBuilder 的所有自訂屬性,以及衍生自指定屬性類型的所有自訂屬性。

GetCustomAttributes(Boolean)

傳回已套用至目前 AssemblyBuilder 的所有自訂屬性。

GetCustomAttributes(Type, Boolean)

來源:
AssemblyBuilder.cs

傳回已套用至目前 AssemblyBuilder 的所有自訂屬性,以及衍生自指定屬性類型的所有自訂屬性。

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 的自訂屬性;如果沒有這類屬性,則陣列是空的。

例外狀況

attributeTypenull

attributeType 不是執行階段所提供的 Type 物件。 例如,attributeTypeTypeBuilder 物件。

適用於

GetCustomAttributes(Boolean)

來源:
AssemblyBuilder.cs

傳回已套用至目前 AssemblyBuilder 的所有自訂屬性。

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

陣列,其中包含自訂屬性;如果沒有屬性,則陣列是空的。

適用於