Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is it not possible to evaluate lambdas in the immediate window?

Tags:

Is there any particular reason? Is it not possible at all or is it just not implemented yet? Maybe there are any third-party addins that allow lambda evaluations?

UPDATE:

I've found this project on codeplex Extended Immediate Window. Seems that it has been abandoned for some time, but this can be a proof of a concept. Does anybody know any other immediate window extension addins? The ones that can run for/foreach statements in C# for instance?

like image 597
Max Avatar asked Jun 14 '10 10:06

Max


People also ask

What is the point of lambdas?

Lambda functions are intended as a shorthand for defining functions that can come in handy to write concise code without wasting multiple lines defining a function. They are also known as anonymous functions, since they do not have a name unless assigned one.

Is lambda expression Cannot contain zero arguments?

A lambda expression can have zero (represented by empty parentheses), one or more parameters. The type of the parameters can be declared explicitly, or it can be inferred from the context. If there is a single parameter, the type is inferred and is not mandatory to use parentheses.


1 Answers

JaredPar of Microsoft wrote a couple of blog posts answering your question: part 1 and part 2. You'll find the answers there.

like image 148
Omer Raviv Avatar answered Sep 24 '22 16:09

Omer Raviv