Name
MatchCollection
Synopsis
This class is a collection of
Match
objects returned by Regex.Matches( )
. This
collection contains each match that an expression finds in the search
string. The Count
property returns the number of
matches found in the string.
public class MatchCollection : ICollection, IEnumerable { // Public Instance Properties public int Count{get; } // implements ICollection public bool IsReadOnly{get; } public bool IsSynchronized{get; } // implements ICollection public object SyncRoot{get; } // implements ICollection public virtual Match this[inti
]{get; } // Public Instance Methods public void CopyTo(Arrayarray
, intarrayIndex
); // implements ICollection public IEnumerator GetEnumerator( ); // implements IEnumerable }
Returned By
Regex.Matches( )
Get C# in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.