-7

if a regular for-loop is refactored to a LINQ, are there any benefits on the execution side or is it just syntax?

4

1 回答 1

1

一般来说,LinQ 使用的是 IEnumerables,所以可能会被延迟执行。但是使用 LinQ 循环并不会变得更快。它可能会变得更快,因为使用 LinQ 允许进行其他优化。但这取决于循环。

于 2013-08-23T11:23:53.233 回答