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のページへのリンク