System.Windows.Forms.ListViewGroupCollection.AddRange Method

Adds the groups in an existing System.Windows.Forms.ListViewGroupCollection to the collection.

Syntax

public void AddRange (ListViewGroupCollection groups)

Parameters

groups
A System.Windows.Forms.ListViewGroupCollection containing the groups to add to the collection.

Remarks

Use this version of the ListViewGroupCollection.AddRange(ListViewGroup[]) method to add the elements of a System.Windows.Forms.ListViewGroupCollection that you retrieve through the ListView.Groups property of a different System.Windows.Forms.ListView control.

Unlike the ListViewGroupCollection.Add(ListViewGroup) method, the ListViewGroupCollection.AddRange(ListViewGroup[]) method does not have a return value that can be used to determine whether a group being added is already in the collection. If you need this information, use the ListViewGroupCollection.Contains(ListViewGroup) method before using the ListViewGroupCollection.AddRange(ListViewGroup[]) method.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0