FieldBuilder.IsDefined(Type, Boolean) Método

Definição

Indica se um atributo com o tipo especificado está 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 forem attributeType definidas neste campo; caso contrário, false.

Exceções

No momento, não há suporte para esse método. Recuperar o campo usando GetField(String, BindingFlags) e chamar IsDefined(Type, Boolean) no retornado FieldInfo.

Aplica-se a