_Type.GetCustomAttributes Método

Definição

Fornece objetos COM com acesso independente de versão para o método GetCustomAttributes.Provides COM objects with version-independent access to the GetCustomAttributes method.

Sobrecargas

GetCustomAttributes(Boolean)

Fornece objetos COM com acesso independente de versão para o método GetCustomAttributes(Boolean).Provides COM objects with version-independent access to the GetCustomAttributes(Boolean) method.

GetCustomAttributes(Type, Boolean)

Fornece objetos COM com acesso independente de versão para o método GetCustomAttributes(Type, Boolean).Provides COM objects with version-independent access to the GetCustomAttributes(Type, Boolean) method.

Comentários

Este método é para acesso a classes gerenciadas de código não gerenciado e não deve ser chamado em código gerenciado.This method is for access to managed classes from unmanaged code, and should not be called from managed code.

O MemberInfo.GetCustomAttributes método retorna todos os atributos aplicados a esse membro.The MemberInfo.GetCustomAttributes method returns all attributes applied to this member.

GetCustomAttributes(Boolean)

Fornece objetos COM com acesso independente de versão para o método 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()

Parâmetros

inherit
Boolean

Especifica se deve-se pesquisar ou não a cadeia de herança desse membro para localizar os atributos.Specifies whether to search this member's inheritance chain to find the attributes.

Retornos

Object[]

Uma matriz de atributos personalizados aplicados a este membro ou uma matriz com zero (0) elementos se nenhum atributo tiver sido aplicado.An array of custom attributes applied to this member, or an array with zero (0) elements if no attributes have been applied.

Comentários

Este método é para acesso a classes gerenciadas de código não gerenciado e não deve ser chamado em código gerenciado.This method is for access to managed classes from unmanaged code, and should not be called from managed code.

O Assembly.GetCustomAttributes método retorna todos os atributos aplicados a esse membro.The Assembly.GetCustomAttributes method returns all attributes applied to this member.

Aplica-se a

GetCustomAttributes(Type, Boolean)

Fornece objetos COM com acesso independente de versão para o método 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()

Parâmetros

attributeType
Type

O tipo de atributo a ser pesquisado.The type of attribute to search for. Somente os atributos que podem ser atribuídos a esse tipo são retornados.Only attributes that are assignable to this type are returned.

inherit
Boolean

Especifica se deve-se pesquisar ou não a cadeia de herança desse membro para localizar os atributos.Specifies whether to search this member's inheritance chain to find the attributes.

Retornos

Object[]

Uma matriz de atributos personalizados aplicados a este membro ou uma matriz com zero (0) elementos se nenhum atributo tiver sido aplicado.An array of custom attributes applied to this member, or an array with zero (0) elements if no attributes have been applied.

Comentários

Este método é para acesso a classes gerenciadas de código não gerenciado e não deve ser chamado em código gerenciado.This method is for access to managed classes from unmanaged code, and should not be called from managed code.

O MemberInfo.GetCustomAttributes método retorna todos os atributos aplicados a esse membro.The MemberInfo.GetCustomAttributes method returns all attributes applied to this member.

Aplica-se a