次の方法で共有


ListView.SelectedListViewItemCollection.Item[] プロパティ

定義

コレクションから項目を取得します。

オーバーロード

名前 説明
Item[String]

指定したキーを持つ項目をコレクションから取得します。

Item[Int32]

コレクション内の指定したインデックス位置にある項目を取得します。

Item[String]

ソース:
ListView.SelectedListViewItemCollection.cs
ソース:
ListView.SelectedListViewItemCollection.cs
ソース:
ListView.SelectedListViewItemCollection.cs
ソース:
ListView.SelectedListViewItemCollection.cs
ソース:
ListView.SelectedListViewItemCollection.cs

指定したキーを持つ項目をコレクションから取得します。

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]

ソース:
ListView.SelectedListViewItemCollection.cs
ソース:
ListView.SelectedListViewItemCollection.cs
ソース:
ListView.SelectedListViewItemCollection.cs
ソース:
ListView.SelectedListViewItemCollection.cs
ソース:
ListView.SelectedListViewItemCollection.cs

コレクション内の指定したインデックス位置にある項目を取得します。

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.SelectedListViewItemCollectionCount プロパティの値以上です。

注釈

このインデクサーを使用すると、 ListView.SelectedListViewItemCollectionから特定の項目を取得できます。 コレクションに格納されている項目は、ListViewで選択した項目を表すListViewListView.ListViewItemCollection内の項目です。

適用対象