Danny initially asked this question in response to a recent Scott Hanselman post:
Who can tell me what’s this :
Func<Customer, bool=””> A optional
parameter with default value? A empty
string for a bool? I replace it with
Func, and get the
different result in my machine!
Everything works well, I get “where”
statement without using Expression!
I know I’ve seen this Func madness, too, but I can’t seem to get a Func<> or an Expression<Func<>> of this type to compile in C# 4.0.
Out of curiosity, what does the equals sign in the Func mean, if anything, and has that functionality been deprecated in C# 4.0?
[This question comes from Scott Hanselman’s blog: “The Weekly Source Code 52 – You keep using that LINQ, I dunna think it means what you think it means.”]
You say you’ve seen it… I doubt that you’ve seen it in code which compiles.
If you have, please give an example: because until I see real code that way, I’m 99% sure it’s just not valid C#.