ListItemCollection.AddRange Method (ListItem[])


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Adds the items in an array of ListItem objects to the collection.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public void AddRange(
	ListItem[] items


Type: System.Web.UI.WebControls.ListItem[]

An array of ListItem objects that contain the items to add to the collection.

Exception Condition

items is null.

Use the AddRange method to add the items in the array of ListItem objects specified by the items parameter. This allows you to add multiple ListItem objects to the collection in a single step.

.NET Framework
Available since 1.1
Return to top