Type.IsArray プロパティ
アセンブリ: mscorlib (mscorlib.dll 内)
構文
解説IsArray プロパティは、Array クラスに対して false を返します。
配列として割り当て可能かどうかのチェックを行うには、typeof(Array).IsAssignableFrom(type) のようなコードを使用します。
現在の Type がジェネリック型、あるいはジェネリック型またはジェネリック メソッドの定義の型パラメータを表している場合、このプロパティは常に false を返します。
使用例Imports System Class TestIsArray Public Shared Sub Main() Dim array As Integer() = {1, 2, 3, 4} Dim at As Type = GetType(Array) Dim t As Type = array.GetType() Console.WriteLine("The type is {0}. Is this type an array? {1}", at, at.IsArray) Console.WriteLine("The type is {0}. Is this type an array? {1}", t, t.IsArray) End Sub 'Main End Class 'TestType
using System; class TestIsArray { public static void Main() { int [] array = {1,2,3,4}; Type at = typeof(Array); Type t = array.GetType(); Console.WriteLine("The type is {0}. Is this type an array? {1}", at, at.IsArray); Console.WriteLine("The type is {0}. Is this type an array? {1}", t, t.IsArray); } }
using namespace System; int main() { array<Int32>^array = {1,2,3,4}; Type^ at = Array::typeid; Type^ t = array->GetType(); Console::WriteLine( "The type is {0}. Is this type an array? {1}", at, at->IsArray.ToString() ); Console::WriteLine( "The type is {0}. Is this type an array? {1}", t, t->IsArray.ToString() ); }
import System.*; class TestIsArray { public static void main(String[] args) { int array[] = { 1, 2, 3, 4 }; Type at = Array.class.ToType(); Type t = array.GetType(); Console.WriteLine("The type is {0}. Is this type an array? {1}", System.Convert.ToString(at), System.Convert.ToString(at.get_IsArray())); Console.WriteLine("The type is {0}. Is this type an array? {1}", System.Convert.ToString(t), System.Convert.ToString(t.get_IsArray())); } //main } //TestIsArray
プラットフォーム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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照_Type.IsArray プロパティ
アセンブリ: mscorlib (mscorlib.dll 内)
構文
解説
プラットフォームWindows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照Weblioに収録されているすべての辞書から_Type.IsArrayを検索する場合は、下記のリンクをクリックしてください。
全ての辞書から_Type.IsArray
を検索
- _Type.IsArrayのページへのリンク