Shortcut syntax for no-arg lambdas?
Although that restriction doesn't appear to be lifted in c# 3.0, one new type-safe workaround is to use a lambda with no arguments:
Code Snippet
var foo = new {Name=""};
foo.Name = "a";
Func<string> getName = ()=> foo.Name;
Console.WriteLine(getName());
foo.Name = "b";
Console.WriteLine(getName());
This is big improvement on what was possible in 2.0 - though I'm curious if there is a shorter syntax for a no-arg lambda expression (instead of the mildly hilarious syntax above).
Thanks,
- John

