Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
Public Class Example
Public Shared Sub Test(ByRef x As Integer, ByRef y As Integer)
End Sub
Public Shared Sub Main()
Dim nums() As Integer = {1, 1, 2, 3, 5, 8, 13}
Dim t As Type = nums.GetType()
Console.WriteLine("HasElementType is '{0}' for array types.", t.HasElementType)
Dim mi As MethodInfo = GetType(Example).GetMethod("Test")
Dim parms() As ParameterInfo = mi.GetParameters()
t = parms(0).ParameterType
Console.WriteLine("HasElementType is '{0}' for ref parameter types.", t.HasElementType)
t = parms(1).ParameterType
Console.WriteLine("HasElementType is '{0}' for parameter types.", t.HasElementType)
End Sub
End Class