ListViewGroupCollection.Item[] Property

Definition

Gets or sets a ListViewGroup in the collection.

Overloads

Item[String]

Gets or sets the ListViewGroup with the specified Name property value.

Item[Int32]

Gets or sets the ListViewGroup at the specified index within the collection.

Item[String]

Gets or sets the ListViewGroup with the specified Name property value.

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

Parameters

key
String

The name of the group to get or set.

Property Value

The ListViewGroup with the specified name, or null if no such ListViewGroup exists.

Applies to

Item[Int32]

Gets or sets the ListViewGroup at the specified index within the collection.

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

Parameters

index
Int32

The index within the collection of the ListViewGroup to get or set.

Property Value

The ListViewGroup at the specified index within the collection.

Exceptions

index is less than 0 or greater than or equal to Count.

Remarks

Use this property to retrieve the group at the specified index within the collection. When you have a reference to the group object and need the index, use the IndexOf method.

Applies to