views:

96

answers:

2

1- <IEnumerable<int>> exceptionFunction = () => list1.Except(list2);

2-

Action displayList = () => exceptionFunction()
                           .ToList()
                           .ForEach(i => Debug.WriteLine(i));

In the code above I am able to translate line 1 to VB with no problem.

Everything I try to convert line 2. gives me an error that no value is returned.

Is this a VB limitation with Lambdas?

+1  A: 

It's a restriction of VB9 lambda expressions, yes. VB10 lambda expressions will be on a par with C#'s, I believe - see the MSDN VB10 "new features" page for lambda expressions for more details.

Jon Skeet
A: 

Thanks, it was driving me nuts!