Array.GetLength メソッドとは何? わかりやすく解説 Weblio辞書 (original) (raw)
Array の指定した次元にある要素の数を表す 32 ビット整数を取得します。
名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文
Public Function GetLength ( _ dimension As Integer _ ) As Integer
Dim instance As Array Dim dimension As Integer Dim returnValue As Integer
returnValue = instance.GetLength(dimension)
public int GetLength ( int dimension )
public: int GetLength ( int dimension )
public int GetLength ( int dimension )
public function GetLength ( dimension : int ) : int
| 例外の種類 | 条件 |
|---|---|
| IndexOutOfRangeException | dimension が 0 未満です。 または dimension が Rank 以上です。 |
GetLength の例としては GetLength(0) があり、これは Array の最初の次元にある要素の数を返します。
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
.NET Framework
サポート対象 : 2.0、1.1、1.0
.NET Compact Framework
サポート対象 : 2.0、1.0
関連項目
Array クラス
Array メンバ
System 名前空間
Length
GetLongLength
ICollection.Count
Rank