Language

AbstractCollection.Clear Method

Definition

Removes all of the elements from this collection (optional operation).

[Android.Runtime.Register("clear", "()V", "GetClearHandler")]
public virtual void Clear();
[<Android.Runtime.Register("clear", "()V", "GetClearHandler")>]
abstract member Clear : unit -> unit
override this.Clear : unit -> unit

Implements

Attributes

Exceptions

it the iterator does not support removing elements from this Collection

Remarks

Removes all of the elements from this collection (optional operation). The collection will be empty after this method returns.

Java documentation for java.util.AbstractCollection.clear().

Java reference for java.util.AbstractCollection.clear.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also