I know Linq is defferedexecution but I want to understand what the compiler does with a statement like this and how it works under the hood
I find Linq fascinating but I worry that I dont understand what is happening under the hood
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Where() is an extension method that could be implemented as something like this:
x => x == 1 is an anonymous procedure that returns true if x == 1 and false otherwise, something like so:
For the details of how the iterator block in Where() compiles, there’s a great series explaining how they are compiled starting here on Eric Lippert’s blog.