I have the following code:
MatchCollection matches = myRegEx.Matches(content);
bool result = (from Match m in matches
where m.Groups["name"].Value.Length > 128
select m).Any();
Is there a way to do this using the LINQ extension method syntax?
Something like this:
bool result = matches.Any(x => ... );
You just need to convert it from an
IEnumerableto anIEnumerable<Match>(IEnumerable<T>) to get access to the LINQ extension provided on IEnumerable<T>.