ParameterInfo.IsOut Property tells whether this is an output parameter.
Imports System
Imports System.Reflection
Imports Microsoft.VisualBasic
Class parminfo
Public Shared Sub mymethod(int1m As Integer, ByRef str2m As String, _
ByRef str3m As String)
str2m = "in mymethod"
End Sub
Public Shared Function Main() As Integer
Dim Mytype As Type = Type.GetType("parminfo")
Dim Mymethodbase As MethodBase = Mytype.GetMethod("mymethod")
Console.Write(Mymethodbase.ToString())
Dim Myarray As ParameterInfo() = Mymethodbase.GetParameters()
Dim Myparam As ParameterInfo
For Each Myparam In Myarray
Console.Write("For parameter # " + Myparam.Position.ToString() _
+ ", the IsOut is - " + Myparam.IsOut.ToString())
Next Myparam
Return 0
End Function
End Class
Related examples in the same category