Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ IsDefined() [6/8]

static bool System.Attribute.IsDefined ( Module element,
Type attributeType,
bool inherit )
inlinestaticinherited

Definition at line 577 of file Attribute.cs.

578 {
579 if (element == null)
580 {
581 throw new ArgumentNullException("element");
582 }
583 if (attributeType == null)
584 {
585 throw new ArgumentNullException("attributeType");
586 }
587 if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
588 {
589 throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass);
590 }
591 return element.IsDefined(attributeType, inherit: false);
592 }
virtual bool IsDefined(Type attributeType, bool inherit)
Definition Module.cs:91

References System.SR.Argument_MustHaveAttributeBaseClass, System.Reflection.Module.IsDefined(), and System.Type.IsSubclassOf().