ListBox.ObjectCollection.Remove(Object) ListBox.ObjectCollection.Remove(Object) ListBox.ObjectCollection.Remove(Object) ListBox.ObjectCollection.Remove(Object) Method

定义

从集合中移除指定的对象。Removes the specified object from the collection.

public:
 virtual void Remove(System::Object ^ value);
public void Remove (object value);
abstract member Remove : obj -> unit
override this.Remove : obj -> unit
Public Sub Remove (value As Object)

参数

value
Object Object Object 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. 若要指定要删除而不是项目本身的项的索引,请使用RemoveAt方法。To specify the index of the item to remove instead of the item itself, use the RemoveAt method. 若要从列表中删除所有项,请使用Clear方法。To remove all items from the list, use the Clear method.

适用于

另请参阅