本文整理匯總了VB.NET中System.Reflection.ParameterInfo.IsOut屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET ParameterInfo.IsOut屬性的具體用法?VB.NET ParameterInfo.IsOut怎麽用?VB.NET ParameterInfo.IsOut使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類System.Reflection.ParameterInfo
的用法示例。
在下文中一共展示了ParameterInfo.IsOut屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: parminfo
' 導入命名空間
Imports System.Reflection
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
Console.WriteLine(ControlChars.CrLf + "Reflection.Parameterinfo")
'Get the ParameterInfo parameter of a function.
'Get the type.
Dim Mytype As Type = Type.GetType("parminfo")
'Get and display the method.
Dim Mymethodbase As MethodBase = Mytype.GetMethod("mymethod")
Console.Write(ControlChars.CrLf + "Mymethodbase = " _
+ Mymethodbase.ToString())
'Get the ParameterInfo array.
Dim Myarray As ParameterInfo() = Mymethodbase.GetParameters()
'Get and display the IsOut of each parameter.
Dim Myparam As ParameterInfo
For Each Myparam In Myarray
Console.Write(ControlChars.CrLf _
+ "For parameter # " + Myparam.Position.ToString() _
+ ", the IsOut is - " + Myparam.IsOut.ToString())
Next Myparam
Return 0
End Function
End Class
輸出:
Reflection.ParameterInfo Mymethodbase = Void mymethod (Int32, System.String ByRef, System.String ByRef) For parameter # 0, the IsOut is - False For parameter # 1, the IsOut is - True For parameter # 2, the IsOut is - False