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

◆ IsDefined() [2/8]

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

Definition at line 654 of file Attribute.cs.

655 {
656 if (element == null)
657 {
658 throw new ArgumentNullException("element");
659 }
660 if (attributeType == null)
661 {
662 throw new ArgumentNullException("attributeType");
663 }
664 if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
665 {
666 throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass);
667 }
668 return element.IsDefined(attributeType, inherit: false);
669 }
virtual bool IsDefined(Type attributeType, bool inherit)
Definition Assembly.cs:322

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