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.

適用於

另請參閱