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.
class System.​Reflection.​CustomAttributeData
Assembly: System.Runtime
Inheritance: object → CustomAttributeData
Provides access to custom attribute data for assemblies, modules, types, members and parameters that are loaded into the reflection-only context.
Properties
public
Type
AttributeType
Gets the type of the attribute.
public
ConstructorInfo
Constructor
Gets a <see cref="T:System.Reflection.ConstructorInfo" /> object that represents the constructor that would have initialized the custom attribute.
public
Collections.​Generic.​IList<​CustomAttributeTypedArgument>
ConstructorArguments
Gets the list of positional arguments specified for the attribute instance represented by the <see cref="T:System.Reflection.CustomAttributeData" /> object.
public
Collections.​Generic.​IList<​CustomAttributeNamedArgument>
NamedArguments
Gets the list of named arguments specified for the attribute instance represented by the <see cref="T:System.Reflection.CustomAttributeData" /> object.
Methods
public
bool
Equals​(object obj)
Returns a value that indicates whether this instance is equal to a specified object.
Returns <see langword="true" /> if <paramref name="obj" /> is equal to the current instance; otherwise, <see langword="false" /> .
obj
An object to compare with this instance, or <see langword="null" /> .
public static
Collections.​Generic.​IList<​CustomAttributeData>
GetCustomAttributes​(Assembly target)
Returns a list of <see cref="T:System.Reflection.CustomAttributeData" /> objects representing data about the attributes that have been applied to the target assembly.
Returns A list of objects that represent data about the attributes that have been applied to the target assembly.
target
The assembly whose custom attribute data is to be retrieved.
public static
Collections.​Generic.​IList<​CustomAttributeData>
GetCustomAttributes​(MemberInfo target)
Returns a list of <see cref="T:System.Reflection.CustomAttributeData" /> objects representing data about the attributes that have been applied to the target member.
Returns A list of objects that represent data about the attributes that have been applied to the target member.
target
The member whose attribute data is to be retrieved.
public static
Collections.​Generic.​IList<​CustomAttributeData>
GetCustomAttributes​(Module target)
Returns a list of <see cref="T:System.Reflection.CustomAttributeData" /> objects representing data about the attributes that have been applied to the target module.
Returns A list of objects that represent data about the attributes that have been applied to the target module.
target
The module whose custom attribute data is to be retrieved.
public static
Collections.​Generic.​IList<​CustomAttributeData>
GetCustomAttributes​(ParameterInfo target)
Returns a list of <see cref="T:System.Reflection.CustomAttributeData" /> objects representing data about the attributes that have been applied to the target parameter.
Returns A list of objects that represent data about the attributes that have been applied to the target parameter.
target
The parameter whose attribute data is to be retrieved.
public
int
GetHashCode​()
Serves as a hash function for a particular type.
Returns A hash code for the current <see cref="T:System.Object" /> .
public
string
ToString​()
Returns a string representation of the custom attribute.
Returns A string value that represents the custom attribute.
protected
void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public
Type
GetType​()
Inherited from object
Gets the <see cref="T:System.Type" /> of the current instance.
Returns The exact runtime type of the current instance.
protected
object
MemberwiseClone​()
Inherited from object
Creates a shallow copy of the current <see cref="T:System.Object" /> .
Returns A shallow copy of the current <see cref="T:System.Object" /> .