Export (0) Print
Expand All

ListViewItem.ListViewSubItemCollection.AddRange Method (String[])

Creates new subitems based on an array and adds them to the collection.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public void AddRange(
	string[] items


Type: System.String[]

An array of strings representing the text of each subitem to add to the collection.

You can use this version of the AddRange method to add an array of strings to the collection, where each string in the collection represents the text of a new subitem. You can use the other version of the AddRange method that accepts an array of strings as a parameter to specify the foreground color, background color, and font for each item being added. If you want to reuse existing ListViewItem.ListViewSubItem objects and add them to the collection, you can use the version of the AddRange method that accepts an array of ListViewItem.ListViewSubItem objects as a parameter.

If you want to add a single ListViewItem.ListViewSubItem, use the Add method. You can also use the Insert method if you want to add a single ListViewItem.ListViewSubItem at a specific position in the collection.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft