ListView.SelectedListViewItemCollection.Item[] プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
コレクションから項目を取得します。
オーバーロード
| 名前 | 説明 |
|---|---|
| Item[String] |
指定したキーを持つ項目をコレクションから取得します。 |
| Item[Int32] |
コレクション内の指定したインデックス位置にある項目を取得します。 |
Item[String]
指定したキーを持つ項目をコレクションから取得します。
public:
virtual property System::Windows::Forms::ListViewItem ^ default[System::String ^] { System::Windows::Forms::ListViewItem ^ get(System::String ^ key); };
public virtual System.Windows.Forms.ListViewItem this[string key] { get; }
member this.Item(string) : System.Windows.Forms.ListViewItem
Default Public Overridable ReadOnly Property Item(key As String) As ListViewItem
パラメーター
- key
- String
コレクションから取得する項目の名前。
プロパティ値
指定したキーを持つ ListViewItem 。
注釈
Name プロパティは、ListView.SelectedListViewItemCollection内のListViewItemのキーに対応します。
キーの比較では、大文字と小文字は区別されません。
key パラメーターがnullまたは空の文字列の場合、Item[]はnullを返します。
適用対象
Item[Int32]
コレクション内の指定したインデックス位置にある項目を取得します。
public:
property System::Windows::Forms::ListViewItem ^ default[int] { System::Windows::Forms::ListViewItem ^ get(int index); };
public System.Windows.Forms.ListViewItem this[int index] { get; }
member this.Item(int) : System.Windows.Forms.ListViewItem
Default Public ReadOnly Property Item(index As Integer) As ListViewItem
パラメーター
- index
- Int32
取得するコレクション内の項目のインデックス。
プロパティ値
コレクション内の指定したインデックス位置にある項目を表す ListViewItem 。
例外
index パラメーターが 0 未満であるか、ListView.SelectedListViewItemCollectionの Count プロパティの値以上です。
注釈
このインデクサーを使用すると、 ListView.SelectedListViewItemCollectionから特定の項目を取得できます。 コレクションに格納されている項目は、ListViewで選択した項目を表すListViewのListView.ListViewItemCollection内の項目です。