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

◆ GetCustomAttribute() [4/8]

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

Definition at line 416 of file Attribute.cs.

417 {
418 Attribute[] customAttributes = GetCustomAttributes(element, attributeType, inherit);
419 if (customAttributes == null || customAttributes.Length == 0)
420 {
421 return null;
422 }
423 if (customAttributes.Length == 1)
424 {
425 return customAttributes[0];
426 }
427 throw new AmbiguousMatchException(SR.RFLCT_AmbigCust);
428 }
static Attribute[] GetCustomAttributes(MemberInfo element, Type attributeType)
Definition Attribute.cs:338

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