ListView コントロール内の項目の 0 から始まるインデックスを取得します。
名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文
'宣言
Public ReadOnly Property Index As Integer
'使用
Dim instance As ListViewItem
Dim value As Integer
value = instance.Index
public int Index { get; }
public:
property int Index {
int get ();
}
/** @property */
public int get_Index ()
public function get Index () : int
プロパティ値
ListView コントロールの ListView.ListViewItemCollection における、項目の 0 から始まるインデックス。項目が ListView コントロールに関連付けられていない場合は -1。
解説
このプロパティを使用して、項目が ListView コントロールに関連付けられているかどうか、および ListView の ListView.ListViewItemCollection 内での位置を確認できます。
プラットフォーム
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