Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
if a regular for-loop is refactored to a LINQ, are there any benefits on the execution side or is it just syntax?
一般来说,LinQ 使用的是 IEnumerables,所以可能会被延迟执行。但是使用 LinQ 循环并不会变得更快。它可能会变得更快,因为使用 LinQ 允许进行其他优化。但这取决于循环。