Type.GetArrayRank メソッド
アセンブリ: mscorlib (mscorlib.dll 内)

Dim instance As Type Dim returnValue As Integer returnValue = instance.GetArrayRank
現在の Type の次元数を保持している Int32。


Imports System Imports Microsoft.VisualBasic Class MyArrayRankSample Public Shared Sub Main() Try Dim myArray(,,) As Integer = {{{12, 2, 35}, {300, 78, 33}}, {{92, 42, 135}, {30, 7, 3}}} Dim myType As Type = myArray.GetType() Console.WriteLine("Contents of myArray: {{{12,2,35} ,{300,78,33}},{{92,42,135},{30,7,3}}}") Console.WriteLine("myArray has {0} dimensions.", myType.GetArrayRank()) Catch e As NotSupportedException Console.WriteLine("NotSupportedException raised.") Console.WriteLine(("Source: " + e.Source)) Console.WriteLine(("Message: " + e.Message)) Catch e As Exception Console.WriteLine("Exception raised.") Console.WriteLine(("Source: " + e.Source)) Console.WriteLine(("Message: " + e.Message)) End Try End Sub 'Main End Class 'MyArrayRankSample
using System; class MyArrayRankSample { public static void Main() { try { int[,,] myArray = new int[,,] {{{12,2,35},{300,78,33}},{{92,42,135},{30,7,3}}}; Type myType = myArray.GetType(); Console.WriteLine("Contents of myArray: {{{12,2,35},{300,78,33}} ,{{92,42,135},{30,7,3}}}"); Console.WriteLine("myArray has {0} dimensions.", myType.GetArrayRank()); } catch(NotSupportedException e) { Console.WriteLine("NotSupportedException raised."); Console.WriteLine("Source: " + e.Source); Console.WriteLine("Message: " + e.Message); } catch(Exception e) { Console.WriteLine("Exception raised."); Console.WriteLine("Source: " + e.Source); Console.WriteLine("Message: " + e.Message); } } }
using namespace System; int main() { try { array<Int32, 3>^myArray = gcnew array<Int32,3>(3,4,5); Type^ myType = myArray->GetType(); Console::WriteLine( "myArray has {0} dimensions.", myType->GetArrayRank() ); } catch ( NotSupportedException^ e ) { Console::WriteLine( "NotSupportedException raised." ); Console::WriteLine( "Source: {0}", e->Source ); Console::WriteLine( "Message: {0}", e->Message ); } catch ( Exception^ e ) { Console::WriteLine( "Exception raised." ); Console::WriteLine( "Source: {0}", e->Source ); Console::WriteLine( "Message: {0}", e->Message ); } }
import System.*; class MyArrayRankSample { public static void main(String[] args) { try { int myArray[, ,] = new int[,,] { { { 12, 2, 35 } , { 300, 78, 33 } } , { { 92, 42, 135 } , { 30, 7, 3 } } }; Type myType = myArray.GetType(); Console.WriteLine("Contents of myArray: {{{12,2,35},{300,78,33}} ," +"{{92,42,135},{30,7,3}}}"); Console.WriteLine("myArray has {0} dimensions.", System.Convert.ToString(myType.GetArrayRank())); } catch (NotSupportedException e) { Console.WriteLine("NotSupportedException raised."); Console.WriteLine("Source: " + e.get_Source()); Console.WriteLine("Message: " + e.get_Message()); } catch (System.Exception e) { Console.WriteLine("Exception raised."); Console.WriteLine("Source: " + e.get_Source()); Console.WriteLine("Message: " + e.get_Message()); } } //main } //MyArrayRankSample

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.GetArrayRank メソッド
アセンブリ: mscorlib (mscorlib.dll 内)

Dim instance As _Type Dim returnValue As Integer returnValue = instance.GetArrayRank
現在の Type の次元数を保持している Int32。


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.GetArrayRankを検索する場合は、下記のリンクをクリックしてください。

- Type.GetArrayRankのページへのリンク