K
K Viltersten
I've got a hint from a gentleman here to use the
following syntax.
public static FileInfo[]
GetFilesRegExp(this DirectoryInfo di, string pat)
{
Regex re = new Regex(pat);
return Array.FindAll(
di.GetFiles(),
(f) => re.IsMatch(f.Name));
}
The problem is that the compiler seems to dislike
"this" in the argument list as well as "goes to"
in the lambda expression.
What's up with that and how do i kill it?
following syntax.
public static FileInfo[]
GetFilesRegExp(this DirectoryInfo di, string pat)
{
Regex re = new Regex(pat);
return Array.FindAll(
di.GetFiles(),
(f) => re.IsMatch(f.Name));
}
The problem is that the compiler seems to dislike
"this" in the argument list as well as "goes to"
in the lambda expression.
What's up with that and how do i kill it?