System.Attribute.Attribute.GetCustomAttribute C# (CSharp) Method

GetCustomAttribute() public static method

public static GetCustomAttribute ( MemberInfo element, Type attributeType, bool inherit ) : Attribute
element System.Reflection.MemberInfo
attributeType Type
inherit bool
return Attribute
		public static Attribute GetCustomAttribute (MemberInfo element, Type attributeType, bool inherit)
		{
			// neither parameter is allowed to be null
			CheckParameters (element, attributeType);

			// MemberInfo inheritance hierarchies can be searched for attributes, so the second
			// parameter of GetCustomAttribute () is respected.
			return MonoCustomAttrs.GetCustomAttribute (element, attributeType, inherit);
		}

Same methods

Attribute.Attribute::GetCustomAttribute ( Assembly element, Type attributeType ) : Attribute
Attribute.Attribute::GetCustomAttribute ( Assembly element, Type attributeType, bool inherit ) : Attribute
Attribute.Attribute::GetCustomAttribute ( MemberInfo element, Type attributeType ) : Attribute
Attribute.Attribute::GetCustomAttribute ( Module element, Type attributeType ) : Attribute
Attribute.Attribute::GetCustomAttribute ( Module element, Type attributeType, bool inherit ) : Attribute
Attribute.Attribute::GetCustomAttribute ( ParameterInfo element, Type attributeType ) : Attribute
Attribute.Attribute::GetCustomAttribute ( ParameterInfo element, Type attributeType, bool inherit ) : Attribute