次の方法で共有


BitArray.Length プロパティ

BitArray 内の要素の数を取得または設定します。

Public Property Length As Integer
[C#]
public int Length {get; set;}
[C++]
public: __property int get_Length();public: __property void set_Length(int);
[JScript]
public function get Length() : int;public function set Length(int);

プロパティ値

BitArray にある要素の数。

例外

例外の種類 条件
ArgumentOutOfRangeException プロパティが 0 未満の値に設定されています。

解説

LengthCount は同じ値を返します。 Length は特定の値に設定できますが、 Count は読み取り専用です。

LengthCount より小さい値に設定した場合、 BitArray は切り捨てられ、インデックス value -1 より後にある要素は削除されます。

LengthCount より大きい値に設定した場合、新しい要素は false に設定されます。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET

参照

BitArray クラス | BitArray メンバ | System.Collections 名前空間