MatchCollection.IList.Clear Method

Definition

Removes all items from the collection.

C#
void IList.Clear();

Implements

Exceptions

The collection is read-only.

Remarks

This member is an explicit interface member implementation. It can be used only when the MatchCollection instance is cast to an IList interface.

Implementations of this method can vary in how they handle the ICollection.Count and the capacity of a collection. Typically, the count is set to zero, and references to other objects from elements of the collection are also released. The capacity can be set to zero or a default value, or it can remain unchanged.

Applies to

Produkt Wersje
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.1