ListBox.ObjectCollection.Remove Method (Object)

 
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.

Removes the specified object from the collection.

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

public void Remove(
	object value
)

Parameters

value
Type: System.Object

An object representing the item to remove from the collection.

When you remove an item from the list, the indexes change for subsequent items in the list. All information about the removed item is deleted. You can use this method to remove a specific item from the list by specifying the actual item to remove from the list. To specify the index of the item to remove instead of the item itself, use the RemoveAt method. To remove all items from the list, use the Clear method.

.NET Framework
Available since 1.1
Return to top
Show: