ListItemCollection.AddRange Method (ListItem[])

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com 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
)

Parameters

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

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

Exception Condition
ArgumentNullException

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
Show: