The instant window is a fantastic tool for checking the current state during the debugging process. I found out that using the question mark can do a little more, as shown in this post .
However, I still don't know how to execute LINQ queries ( including lambda expressions). I also could not execute the foreach statement.
When performing the following statements:
?(things.Select(thing=>thing.Id);) ?(foreach(var thing in things);)
I get the following errors:
Expression cannot contain lambda expressions
Invalid expression term 'foreach'
(How) can I execute them in the Immediate window?
There is also a tool in VS Gallery , but he said that it only works for VS05 and VS08, which most programmers left behind looong time ago. I am looking for something that applies to VS13 and / or VS15.
c # lambda linq visual-studio immediate-window
Konrad Viltersten
source share