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.​ParameterInfo
Assembly: System.Runtime
Inheritance: object → ParameterInfo
Discovers the attributes of a parameter and provides access to parameter metadata.
Fields and Constants
protected
ParameterAttributes
AttrsImpl
The attributes of the parameter.
protected
Type
ClassImpl
The <see langword="Type" /> of the parameter.
protected
object
DefaultValueImpl
The default value of the parameter.
protected
MemberInfo
MemberImpl
The member in which the field is implemented.
protected
string
NameImpl
The name of the parameter.
protected
int
PositionImpl
The zero-based position of the parameter in the parameter list.
Properties
public
ParameterAttributes
Attributes
Gets the attributes for this parameter.
CustomAttributes
Gets a collection that contains this parameter's custom attributes.
public
object
DefaultValue
Gets a value indicating the default value if the parameter has a default value.
public
bool
HasDefaultValue
Gets a value that indicates whether this parameter has a default value.
public
bool
IsIn
Gets a value indicating whether this is an input parameter.
public
bool
IsLcid
Gets a value indicating whether this parameter is a locale identifier (lcid).
public
bool
IsOptional
Gets a value indicating whether this parameter is optional.
public
bool
IsOut
Gets a value indicating whether this is an output parameter.
public
bool
IsRetval
Gets a value indicating whether this is a <see langword="Retval" /> parameter.
public
MemberInfo
Member
Gets a value indicating the member in which the parameter is implemented.
public
int
MetadataToken
Gets a value that identifies this parameter in metadata.
public
string
Name
Gets the name of the parameter.
public
Type
ParameterType
Gets the <see langword="Type" /> of this parameter.
public
int
Position
Gets the zero-based position of the parameter in the formal parameter list.
public
object
RawDefaultValue
Gets a value indicating the default value if the parameter has a default value.
Methods
public
object[]
GetCustomAttributes​(bool inherit)
inherit
This argument is ignored for objects of this type.
Returns An array that contains all the custom attributes applied to this parameter.
Gets all the custom attributes defined on this parameter.
public
object[]
GetCustomAttributes​(Type attributeType,
bool inherit)
attributeType
The custom attributes identified by type.
inherit
This argument is ignored for objects of this type.
Returns An array that contains the custom attributes of the specified type or its derived types.
Gets the custom attributes of the specified type or its derived types that are applied to this parameter.
GetCustomAttributesData​()
Returns A generic list of <see cref="T:System.Reflection.CustomAttributeData" /> objects representing data about the attributes that have been applied to the current parameter.
Returns a list of <see cref="T:System.Reflection.CustomAttributeData" /> objects for the current parameter, which can be used in the reflection-only context.
Gets the modified type of this parameter object.
public
Type[]
GetOptionalCustomModifiers​() Returns An array of <see cref="T:System.Type" /> objects that identify the optional custom modifiers of the current parameter, such as <see cref="T:System.Runtime.CompilerServices.IsConst" /> or <see cref="T:System.Runtime.CompilerServices.IsImplicitlyDereferenced" /> .
Gets the optional custom modifiers of the parameter.
public
object
GetRealObject​(Runtime.Serialization.StreamingContext context)
context
The serialized stream from which the current object is deserialized.
Returns The actual object that is put into the graph.
Returns the real object that should be deserialized instead of the object that the serialized stream specifies.
public
Type[]
GetRequiredCustomModifiers​() Returns An array of <see cref="T:System.Type" /> objects that identify the required custom modifiers of the current parameter, such as <see cref="T:System.Runtime.CompilerServices.IsConst" /> or <see cref="T:System.Runtime.CompilerServices.IsImplicitlyDereferenced" /> .
Gets the required custom modifiers of the parameter.
public
bool
IsDefined​(Type attributeType,
bool inherit)
attributeType
The <see langword="Type" /> object to search for.
inherit
This argument is ignored for objects of this type.
Returns <see langword="true" /> if one or more instances of <paramref name="attributeType" /> or its derived types are applied to this parameter; otherwise, <see langword="false" /> .
Determines whether the custom attribute of the specified type or its derived types is applied to this parameter.
public
string
ToString​() Returns A string containing the type and the name of the parameter.
Gets the parameter type and name represented as a string.
public
bool
Equals​(object obj)
Inherited from object
obj
The object to compare with the current object.
Returns <see langword="true" /> if the specified object is equal to the current object; otherwise, <see langword="false" /> .
Determines whether the specified object is equal to the current object.
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
int
GetHashCode​()
Inherited from object
Returns A hash code for the current object.
Serves as the default hash function.
public
Type
GetType​()
Inherited from object
Returns The exact runtime type of the current instance.
Gets the <see cref="T:System.Type" /> of the current instance.
protected
object
MemberwiseClone​()
Inherited from object
Returns A shallow copy of the current <see cref="T:System.Object" /> .
Creates a shallow copy of the current <see cref="T:System.Object" /> .