This documentation is archived and is not being maintained.

ListBox.ObjectCollection.Remove Method

Removes the specified object from the collection.

[Visual Basic]
Public Overridable Sub Remove( _
   ByVal value As Object _
) Implements IList.Remove
public virtual void Remove(
 object value
public: virtual void Remove(
 Object* value
public function Remove(
   value : 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.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

ListBox.ObjectCollection Class | ListBox.ObjectCollection Members | System.Windows.Forms Namespace | Clear | RemoveAt