コレクション内の指定したインデックスにある項目を取得します。
[C#] C# では、このプロパティは ListView.SelectedListViewItemCollection クラスのインデクサになります。
Public Default ReadOnly Property Item( _
ByVal index As Integer _) As ListViewItem
[C#]
public ListViewItem this[intindex] {get;}
[C++]
public: __property ListViewItem* get_Item(intindex);
[JScript]
returnValue = SelectedListViewItemCollectionObject.Item(index);またはreturnValue = SelectedListViewItemCollectionObject(index);
[JScript] JScript では、この型で定義されている既定のインデックス プロパティを使用することができます。しかし、独自のインデックス プロパティを明示的に定義することはできません。ただし、このクラスの expando 属性を指定すると、既定のインデックス プロパティが提供されます。提供されるインデックス プロパティの型は Object 型であり、インデックス型は String になります。
引数 [JScript]
- index
コレクション内の取得する項目のインデックス。
パラメータ [Visual Basic, C#, C++]
- index
コレクション内の取得する項目のインデックス。
プロパティ値
コレクション内の指定したインデックスにある項目を表す ListViewItem 。
例外
例外の種類 | 条件 |
---|---|
ArgumentOutOfRangeException | index パラメータの値が 0 未満か、 ListView.SelectedListViewItemCollection の Count プロパティの値以上です。 |
解説
このインデクサを使用すると、 ListView.SelectedListViewItemCollection から、特定の項目を取得できます。このコレクション内に格納されている項目は、 ListView の ListView.ListViewItemCollection 内の項目であり、 ListView 内で選択された項目を表します。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
ListView.SelectedListViewItemCollection クラス | ListView.SelectedListViewItemCollection メンバ | System.Windows.Forms 名前空間