Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

struct System.​Reflection.​ICustomAttributeProvider

Assembly: System.Runtime

Provides custom attributes for reflection objects that support them.

Methods

public object[]
GetCustomAttributes​(bool inherit)
inherit When <see langword="true" /> , look up the hierarchy chain for the inherited custom attribute.
Returns An array of Objects representing custom attributes, or an empty array.
Returns an array of all of the custom attributes defined on this member, excluding named attributes, or an empty array if there are no custom attributes.
public object[]
GetCustomAttributes​(Type attributeType, bool inherit)
attributeType The type of the custom attributes.
inherit When <see langword="true" /> , look up the hierarchy chain for the inherited custom attribute.
Returns An array of Objects representing custom attributes, or an empty array.
Returns an array of custom attributes defined on this member, identified by type, or an empty array if there are no custom attributes of that type.
public bool
IsDefined​(Type attributeType, bool inherit)
attributeType The type of the custom attributes.
inherit When <see langword="true" /> , look up the hierarchy chain for the inherited custom attribute.
Returns <see langword="true" /> if the <paramref name="attributeType" /> is defined on this member; <see langword="false" /> otherwise.
Indicates whether one or more instance of <paramref name="attributeType" /> is defined on this member.