LINQ statement as if condition
- by dotnetdev
I saw a piece of code which was written like this:
if (from n in numbers select n where n = 5)
However, I tried writing something like this but came across errors (bare in mind the code sample may not be exactly as above as I am typing from memory). How can I write code like the above?
Thanks