Name
ParameterInfo
Synopsis
This class allows the inspection of the type and behavior of a method
parameter. Because parameters can have custom attributes on them,
the class implements ICustomAttributeProvider
. Attributes
returns the attributes defined on this parameter. If
the parameter has a default, it is stored in DefaultValue
.
Retrieve the name, type, and member the parameter is from by
inspecting Name
, ParameterType
,
and Member
. Position
returns
the ordinal position of this parameter. IsOptional
returns true
if the parameter is optional, and IsLcid
indicates when the parameter is a locale identifier.
A parameter is passed by reference if the IsByRef
property of its ParameterType
property is true
and the IsOut
property is false
(out parameters have IsByRef
and IsOut
set
to true
). A parameter that has been marked as (In)
has IsOut
set to false
and IsIn
set to true
.
Public Class ParameterInfo : Implements ICustomAttributeProvider ' Protected Constructors Protected Sub New() ' Protected Instance Fields protected AttrsImpl As ParameterAttributes protected ClassImpl As Type protected DefaultValueImpl As Object protected MemberImpl As MemberInfo protected NameImpl As String protected PositionImpl As Integer ' Public Instance Properties Overridable Public ReadOnly Property Attributes As ParameterAttributes Overridable Public ReadOnly Property DefaultValue As Object Public ReadOnly Property IsIn As Boolean Public ReadOnly Property IsLcid As Boolean Public ReadOnly Property IsOptional ...
Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.