Information.VarType メソッド
アセンブリ: Microsoft.VisualBasic (microsoft.visualbasic.dll 内)
構文
Dim VarName As Object Dim returnValue As VariantType returnValue = Information.VarType(VarName)
戻り値
変数のデータ型の分類を含む Integer 値を返します。
詳細については、Visual Basic のトピック「VarType 関数 (Visual Basic)」を参照してください。
VarType により返される整数値は、VariantType 列挙型 のメンバです。
次の表に、特殊な VarName に対して VarType により返される値を示します。
VarType 関数を使用して複数の変数に関するデータ型分類情報を返す例を次に示します。
Dim testString As String = "String for testing" Dim testObject As New Object Dim testNumber, testArray(5) As Integer Dim testVarType As VariantType testVarType = VarType(testVarType) ' Returns VariantType.Integer. testVarType = VarType(testString) ' Returns VariantType.String. testVarType = VarType(testObject) ' Returns VariantType.Object. testVarType = VarType(testNumber) ' Returns VariantType.Integer. testVarType = VarType(testArray) ' Returns the bitwise OR of VariantType.Array and VariantType.Integer.
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
Information クラス
Information メンバ
Microsoft.VisualBasic 名前空間
その他の技術情報
VarType 関数 (Visual Basic)
データ型の概要 (Visual Basic)
オブジェクト型 (Object)
VariantType 列挙型
Weblioに収録されているすべての辞書からInformation.VarType メソッドを検索する場合は、下記のリンクをクリックしてください。
全ての辞書からInformation.VarType メソッドを検索
- Information.VarType メソッドのページへのリンク