_ConstructorInfo.GetCustomAttributes Método
Definição
Fornece objetos COM com acesso independente de versão para os membros GetCustomAttributes.Provides COM objects with version-independent access to the GetCustomAttributes members.
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
Os GetCustomAttributes Membros retornam todos os atributos aplicados a esse membro.The GetCustomAttributes members return 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 que contém todos os atributos personalizados ou uma matriz com zero elementos se nenhum atributo for definido.An array that contains all the custom attributes, or an array with zero elements if no attributes are defined.
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 GetCustomAttributes método retorna uma matriz que contém todos os atributos personalizados.The GetCustomAttributes method returns an array containing all the custom attributes.
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 GetCustomAttributes método retorna uma matriz de atributos personalizados identificados pelo Type .The GetCustomAttributes method returns an array of custom attributes identified by Type.