FieldBuilder.IsDefined(Type, Boolean) Método

Definición

Indica si un atributo que tenga el tipo especificado, aparece definido en un 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

Tipo del atributo.

inherit
Boolean

Controla la herencia de los atributos personalizados de las clases base.

Devoluciones

true si hay definidas una o más instancias de attributeType en este campo; en cualquier otro caso, false.

Excepciones

Este método no se admite actualmente. Recupera el campo mediante GetField(String, BindingFlags) y llama a IsDefined(Type, Boolean) en el FieldInfo devuelto.

Se aplica a