I have already posted about Deferred Execution hereIn this article we will see the internals of Deferred or Lazy Execution of LINQ. Deferred Execution executes the query only when a loop starts. What I mean here is that, we iterate through the query variable to get the result. Here the result variable does not contain the actual result. To get the result, we may iterate through the result (query) variable in a loop as many times as we want. We do deferred execution mainly when multiple values are being returned from the query. Deferred execution can be avoided
Dhananjay kumar is an independent trainer, a consultant and a programmer from India. He has mentored more than 1000 professionals and known for his unique way of teaching. He has been part of the multiple projects for bi... Read more
C# Corner. All contents are copyright of their authors.