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
Implemented Interfaces
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.
public
Collections.​Generic.​IEnumerable<​CustomAttributeData>
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)
Gets all the custom attributes defined on this parameter.
Returns An array that contains all the custom attributes applied to this parameter.
inherit
This argument is ignored for objects of this type.
public
object[]
GetCustomAttributes​(Type attributeType,
bool inherit)
Gets the custom attributes of the specified type or its derived types that are applied to this parameter.
Returns An array that contains the custom attributes of the specified type or its derived types.
attributeType
The custom attributes identified by type.
inherit
This argument is ignored for objects of this type.
public
Collections.​Generic.​IList<​CustomAttributeData>
GetCustomAttributesData​()
Returns a list of <see cref="T:System.Reflection.CustomAttributeData" /> objects for the current parameter, which can be used in the reflection-only context.
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.
public
Type
GetModifiedParameterType​()
Gets the modified type of this parameter object.
Returns A modified type.
public
Type[]
GetOptionalCustomModifiers​()
Gets the optional custom modifiers of the parameter.
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" /> .
public
object
GetRealObject​(Runtime.​Serialization.​StreamingContext context)
Returns the real object that should be deserialized instead of the object that the serialized stream specifies.
Returns The actual object that is put into the graph.
context
The serialized stream from which the current object is deserialized.
public
Type[]
GetRequiredCustomModifiers​()
Gets the required custom modifiers of the parameter.
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" /> .
public
bool
IsDefined​(Type attributeType,
bool inherit)
Determines whether the custom attribute of the specified type or its derived types is applied to this parameter.
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" /> .
attributeType
The <see langword="Type" /> object to search for.
inherit
This argument is ignored for objects of this type.
public
string
ToString​()
Gets the parameter type and name represented as a string.
Returns A string containing the type and the name of the parameter.
public
bool
Equals​(object obj)
Inherited from object
Determines whether the specified object is equal to the current object.
Returns <see langword="true" /> if the specified object is equal to the current object; otherwise, <see langword="false" /> .
obj
The object to compare with 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
Serves as the default hash function.
Returns A hash code for the current object.
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" /> .