views:

19

answers:

1

I am reading up on Linq and the author uses both query expressions and dot notation. He says that the query expression is translated to the dot notation. So is it true that dot notation is faster?

+1  A: 

"Query expression is translated to the dot notation" means that the compiler translates LINQ statements to invokations of the equivalent methods (which are in the Enumerable class, by the way). So, if you directly use the methods you are just saving some work to the compiler, but at runtime there is indeed no difference. Use whatever notation makes your code more readable.

Konamiman