ListViewGroupCollection.Item[] 屬性

定義

取得或設定集合中的 ListViewGroup

多載

Item[String]

取得或設定具有指定之 ListViewGroup 屬性值的 Name

Item[Int32]

取得或設定集合內位於指定索引處的 ListViewGroup

Item[String]

取得或設定具有指定之 ListViewGroup 屬性值的 Name

public:
 property System::Windows::Forms::ListViewGroup ^ default[System::String ^] { System::Windows::Forms::ListViewGroup ^ get(System::String ^ key); void set(System::String ^ key, System::Windows::Forms::ListViewGroup ^ value); };
public System.Windows.Forms.ListViewGroup this[string key] { get; set; }
public System.Windows.Forms.ListViewGroup? this[string key] { get; set; }
member this.Item(string) : System.Windows.Forms.ListViewGroup with get, set
Default Public Property Item(key As String) As ListViewGroup

參數

key
String

要取得或設定的群組名稱。

屬性值

具有指定名稱的 ListViewGroup,如果沒有這種 ListViewGroup 則為 null

適用於

Item[Int32]

取得或設定集合內位於指定索引處的 ListViewGroup

public:
 property System::Windows::Forms::ListViewGroup ^ default[int] { System::Windows::Forms::ListViewGroup ^ get(int index); void set(int index, System::Windows::Forms::ListViewGroup ^ value); };
public System.Windows.Forms.ListViewGroup this[int index] { get; set; }
member this.Item(int) : System.Windows.Forms.ListViewGroup with get, set
Default Public Property Item(index As Integer) As ListViewGroup

參數

index
Int32

在要取得或設定的 ListViewGroup 集合中的索引。

屬性值

ListViewGroup,位於集合中指定的索引處。

例外狀況

index 小於 0,或大於等於 Count

備註

使用這個屬性來擷取集合內指定索引處的群組。 當您有群組物件的參考並需要索引時,請使用 IndexOf 方法。

適用於