Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ GetCustomAttributes() [12/16]

static Attribute[] System.Attribute.GetCustomAttributes ( Module element,
Type attributeType,
bool inherit )
inlinestaticinherited

Definition at line 555 of file Attribute.cs.

556 {
557 if (element == null)
558 {
559 throw new ArgumentNullException("element");
560 }
561 if (attributeType == null)
562 {
563 throw new ArgumentNullException("attributeType");
564 }
565 if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
566 {
567 throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass);
568 }
569 return (Attribute[])element.GetCustomAttributes(attributeType, inherit);
570 }
virtual object[] GetCustomAttributes(bool inherit)
Definition Module.cs:101

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