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

◆ GetCustomAttribute() [8/8]

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

Definition at line 518 of file Attribute.cs.

519 {
520 Attribute[] customAttributes = GetCustomAttributes(element, attributeType, inherit);
521 if (customAttributes == null || customAttributes.Length == 0)
522 {
523 return null;
524 }
525 if (customAttributes.Length == 0)
526 {
527 return null;
528 }
529 if (customAttributes.Length == 1)
530 {
531 return customAttributes[0];
532 }
533 throw new AmbiguousMatchException(SR.RFLCT_AmbigCust);
534 }
static Attribute[] GetCustomAttributes(MemberInfo element, Type attributeType)
Definition Attribute.cs:338

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