Export (0) Print
Expand All

ListBox.ObjectCollection.Remove Method

Removes the specified object from the collection.

[Visual Basic]
Public Overridable Sub Remove( _
   ByVal value As Object _
) Implements IList.Remove
[C#]
public virtual void Remove(
 object value
);
[C++]
public: virtual void Remove(
 Object* value
);
[JScript]
public function Remove(
   value : Object
);

Parameters

value
An object representing the item to remove from the collection.

Implements

IList.Remove

Remarks

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.

Requirements

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

Show:
© 2014 Microsoft