Mega Code Archive

 
Categories / VB.Net / Reflection
 

Creates the type array of Example

Imports System Imports System.Reflection Imports System.Runtime.InteropServices Public Class Example     Public Shared Sub Test(ByRef x As Integer, <Out> 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)         t = GetType(Example).MakeArrayType()         Console.WriteLine("HasElementType is '{0}' for array types.", t.HasElementType)     End Sub End Class