为什么Regex.Match没有GetEnumerator函数?

1 .net c# regex standards .net-3.5

Regex.Match有.Success和.NextMatch为什么它没有GetEnumerator函数?

凭借我的逻辑,实现起来似乎很容易.但它不在3.5,所以任何人都可以告诉我为什么不呢?

foreach (var m in Regex.Match("dummy text", "mm")) error CS1579: foreach statement cannot operate on variables of type 'System.Text.RegularExpressions.Match' because 'System.Text.RegularExpressions.Match' does not contain a public definition for 'GetEnumerator'
Run Code Online (Sandbox Code Playgroud)

Mar*_*ers 10

也许你想要Regex.Matches