FieldBuilder.IsDefined(Type, Boolean) Método

Definição

Indica se um atributo contendo o tipo especificado é definido em um campo.

public:
 override bool IsDefined(Type ^ attributeType, bool inherit);
public override bool IsDefined (Type attributeType, bool inherit);
override this.IsDefined : Type * bool -> bool
Public Overrides Function IsDefined (attributeType As Type, inherit As Boolean) As Boolean

Parâmetros

attributeType
Type

O tipo do atributo.

inherit
Boolean

Controla a herança de atributos personalizados de classes base.

Retornos

true se uma ou mais instâncias de attributeType estão definidas nesse campo; caso contrário, false.

Exceções

Não há suporte para este método atualmente. Recuperar o campo usando GetField(String, BindingFlags) e chamar IsDefined(Type, Boolean) no FieldInfo retornado.

Aplica-se a