Provides an enumerator in the same order as Item.
Assembly: System (in System.dll)
Iterating the members of the MatchCollection object using the method (or the foreach statement in C# and the For Each...Next statement in Visual Basic) causes the regular expression engine to populate the collection on an as needed basis using lazy evaluation. This is analogous to repeatedly calling the Regex.Match method, and then adding the resulting match to the MatchCollection object. In contrast, the regular expression engine uses direct evaluation to populate the collection all at once when the Count property is accessed. This can be a much more expensive method of building the collection than lazy evaluation.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.