_Assembly.GetCustomAttributes _Assembly.GetCustomAttributes _Assembly.GetCustomAttributes _Assembly.GetCustomAttributes Method

定義

為 COM 物件提供與版本無關的 GetCustomAttributes 方法之存取權。Provides COM objects with version-independent access to the GetCustomAttributes methods.

多載

GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean)

為 COM 物件提供與版本無關的 GetCustomAttributes(Type, Boolean) 方法之存取權。Provides COM objects with version-independent access to the GetCustomAttributes(Type, Boolean) method.

GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean)

為 COM 物件提供與版本無關的 GetCustomAttributes(Boolean) 方法之存取權。Provides COM objects with version-independent access to the GetCustomAttributes(Boolean) method.

備註

這個方法是用來從非受控程式碼存取 managed 類別, 而且不應該從 managed 程式碼呼叫。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

GetCustomAttributes方法會取得這個元件的自訂屬性。The GetCustomAttributes methods get the custom attributes for this assembly.

GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean)

為 COM 物件提供與版本無關的 GetCustomAttributes(Type, Boolean) 方法之存取權。Provides COM objects with version-independent access to the GetCustomAttributes(Type, Boolean) method.

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

參數

attributeType
Type Type Type Type

要為其傳回自訂屬性的 TypeThe Type for which the custom attributes are to be returned.

inherit
Boolean Boolean Boolean Boolean

Assembly 類型的物件會忽略這個引數。This argument is ignored for objects of type Assembly.

傳回

Object[]

Object 類型的陣列,包含這個組件由 attributeType 指定的自訂屬性。An array of type Object containing the custom attributes for this assembly as specified by attributeType.

備註

這個方法是用來從非受控程式碼存取 managed 類別, 而且不應該從 managed 程式碼呼叫。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

GetCustomAttributes方法會取得這個元件的所有自訂屬性。The GetCustomAttributes method gets all the custom attributes for this assembly.

另請參閱

GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean)

為 COM 物件提供與版本無關的 GetCustomAttributes(Boolean) 方法之存取權。Provides COM objects with version-independent access to the GetCustomAttributes(Boolean) method.

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

參數

inherit
Boolean Boolean Boolean Boolean

Assembly 類型的物件會忽略這個引數。This argument is ignored for objects of type Assembly.

傳回

Object[]

Object 類型的陣列,包含這個組件的自訂屬性。An array of type Object containing the custom attributes for this assembly.

備註

這個方法是用來從非受控程式碼存取 managed 類別, 而且不應該從 managed 程式碼呼叫。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

GetCustomAttributes方法會取得這個元件的所有自訂屬性。The GetCustomAttributes method gets all the custom attributes for this assembly.

另請參閱

適用於