Skip to content

HasAttribute Method ​

Definition ​

  • Namespace: JASE
  • Assembly: JASE.ReflectionTools.dll

Overloads ​

NameDescription
bool HasAttribute(PropertyDescriptor descriptor)Returns TRUE if property is decorated with the Attribute
bool HasAttribute(PropertyInfo property)Returns TRUE if property is decorated with the Attribute
bool HasAttribute(Type type)Returns TRUE if type is decorated with the Attribute
bool HasAttribute(MethodInfo method, Type attribute)Checks Type to determine if it is decorated with the Attribute
bool HasAttribute(PropertyInfo property, Type attribute)Checks a property to determine if it is decorated with the specified attribute
bool HasAttribute(Type type, Type attribute)Checks Type to determine if it is decorated with the Attribute
bool HasAttribute(PropertyInfo property, string attribute, bool caseInsensitive = null)Checks a property to determine if it is decorated with the specified attribute

bool HasAttribute(MethodInfo method, Type attribute) ​

csharp
bool HasAttribute(MethodInfo method, Type attribute)

Checks Type to determine if it is decorated with the Attribute

Returns ​

returns true of 'type' has the requested attribute type

bool HasAttribute(PropertyInfo property, string attribute, bool caseInsensitive = null) ​

csharp
bool HasAttribute(PropertyInfo property, string attribute, bool caseInsensitive = null)

Checks a property to determine if it is decorated with the specified attribute

bool HasAttribute(PropertyInfo property, Type attribute) ​

csharp
bool HasAttribute(PropertyInfo property, Type attribute)

Checks a property to determine if it is decorated with the specified attribute

bool HasAttribute(Type type, Type attribute) ​

csharp
bool HasAttribute(Type type, Type attribute)

Checks Type to determine if it is decorated with the Attribute

Parameters ​

NameDescription
attributeType inheriting fro System.Attribute to search for
typeDataType to search for desired attribute

Returns ​

returns true if 'type' has the requested attribute type

bool HasAttribute(PropertyDescriptor descriptor) ​

csharp
bool HasAttribute(PropertyDescriptor descriptor)

Returns TRUE if property is decorated with the Attribute

bool HasAttribute(PropertyInfo property) ​

csharp
bool HasAttribute(PropertyInfo property)

Returns TRUE if property is decorated with the Attribute

bool HasAttribute(Type type) ​

csharp
bool HasAttribute(Type type)

Returns TRUE if type is decorated with the Attribute