dennisdoomen / CSharpGuidelines

A set of coding guidelines for C# 9.0, design principles and layout rules for improving the overall quality of your code development.
https://www.csharpcodingguidelines.com
Other
745 stars 272 forks source link

Inconsistency on LINQ expression formatting #173

Closed bkoelman closed 5 years ago

bkoelman commented 6 years ago

AV2220 (Avoid LINQ for simple expressions):

Since LINQ queries should be written out over multiple lines for readability, the second example is a bit more compact.

AV2400 (Use a common layout):

Put the entire LINQ statement on one line, or start each keyword at the same indentation, like this