PropertyBuilder.IsDefined(Type, Boolean) Método

Definição

Indica se uma ou mais instância de attributeType está definida nessa propriedade.Indicates whether one or more instance of attributeType is defined on this property.

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 objeto Type ao qual os atributos personalizados são aplicados.The Type object to which the custom attributes are applied.

inherit
Boolean

Especifica se deve percorrer cadeia de herança dessa propriedade para localizar os atributos personalizados.Specifies whether to walk up this property's inheritance chain to find the custom attributes.

Retornos

Boolean

true se um ou mais instância de attributeType estiver definida nessa propriedade; caso contrário false.true if one or more instance of attributeType is defined on this property; otherwise false.

Exceções

Não há suporte para o método.This method is not supported.

Comentários

Reflita no tipo de pai da propriedade usando Type. GetType ou assembly. GetType, recupere o objeto de propriedade Reflection do tipo e chame PropertyInfo. IsDefined.Reflect on the property's parent type using Type.GetType or Assembly.GetType, retrieve the Reflection property object from the type, and call PropertyInfo.IsDefined.

Aplica-se a