private static void DoSomethingWithAttributes(MatchCollection matches, KeyValuePairFunctor functor) { foreach (Match attribute in matches) { string name = attribute.Groups["name"].Value; string value = attribute.Groups["value"].Value; functor(name, value); } }
private static void DoSomethingWithAttributes(MatchCollection matches, KeyValuePairFunctor functor) { foreach (Match attribute in matches) { var name = attribute.Groups["name"].Value; var value = attribute.Groups["value"].Value; functor(name, value); } }