Problems compiling a lambda expression
- From: "K Viltersten" <tmp1@xxxxxxxxxxxxxx>
- Date: Sat, 26 Jul 2008 19:39:17 +0200
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?
--
Regards
Konrad Viltersten
----------------------------------------
May all spammers die an agonizing death;
have no burial places; their souls be
chased by demons in Gehenna from one room
to another for all eternity and beyond.
.
- Follow-Ups:
- Re: Problems compiling a lambda expression
- From: Peter Duniho
- Re: Problems compiling a lambda expression
- Prev by Date: Re: What cryptoalgorithm supports CipherMode.CTS?
- Next by Date: Re: Problems compiling a lambda expression
- Previous by thread: TreeView With RightToLeft Layout
- Next by thread: Re: Problems compiling a lambda expression
- Index(es):
Relevant Pages
|