Accepted answer

both codes will return the same results. both have deferred execution (i.e. nothing will actually be executed until you start enumerating the result) and stream the results (i.e. not buffered). there shouldn't be a significant performance difference between the two versions


it's definitely functionally identical (although i've assumed that the lack of a new keyword in your linq example was a typo).

there's a bit of null checking in select, but that's unlikely to significantly affect performance.

jon skeet has a good writeup on his blog here:

Related Query

More Query from same tag