Information.IsArray Method
.NET Framework 4
Returns a Boolean value indicating whether a variable points to an array.
Assembly: Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)
Parameters
- VarName
- Type: System.Object
Required. Object variable.
Return Value
Type: System.BooleanReturns a Boolean value indicating whether a variable points to an array.
This example uses the IsArray function to check if several variables refer to an array.
Dim firstArray(4), secondArray(3) As Integer Dim thisString As String = "Test" Dim arrayCheck As Boolean arrayCheck = IsArray(firstArray) arrayCheck = IsArray(secondArray) arrayCheck = IsArray(thisString) ' The first two calls to IsArray return True; the third returns False.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.