Table of Contents

Class MatchCollection

Namespace
System.Text.RegularExpressions
Assembly
System.Text.RegularExpressions.dll
public class MatchCollection : ICollection, IEnumerable
Inheritance
MatchCollection
Implements
Inherited Members
Extension Methods

Properties

Count

Gets the number of matches.

public int Count { get; }

Property Value

int

IsReadOnly

Gets a value that indicates whether the collection is read only.

public bool IsReadOnly { get; }

Property Value

bool

IsSynchronized

Gets a value indicating whether access to the collection is synchronized (thread-safe).

public bool IsSynchronized { get; }

Property Value

bool

this[int]

Gets an individual member of the collection.

public virtual Match this[int i] { get; }

Parameters

i int

Property Value

Match

SyncRoot

Gets an object that can be used to synchronize access to the collection.

public object SyncRoot { get; }

Property Value

object

Methods

CopyTo(Array, int)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

public void CopyTo(Array array, int arrayIndex)

Parameters

array Array

The one-dimensional Array that is the destination of the elements copied from ICollection. The Array must have zero-based indexing.

arrayIndex int

GetEnumerator()

Returns an enumerator that iterates through a collection.

public IEnumerator GetEnumerator()

Returns

IEnumerator

An IEnumerator object that can be used to iterate through the collection.