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

◆ GetCustomAttribute() [6/8]

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

Definition at line 599 of file Attribute.cs.

600 {
601 Attribute[] customAttributes = GetCustomAttributes(element, attributeType, inherit);
602 if (customAttributes == null || customAttributes.Length == 0)
603 {
604 return null;
605 }
606 if (customAttributes.Length == 1)
607 {
608 return customAttributes[0];
609 }
610 throw new AmbiguousMatchException(SR.RFLCT_AmbigCust);
611 }
static Attribute[] GetCustomAttributes(MemberInfo element, Type attributeType)
Definition Attribute.cs:338

References System.Attribute.GetCustomAttributes(), and System.SR.RFLCT_AmbigCust.