Closed ricardoboss closed 6 months ago
I don't have strong opinions here, but:
csharp_style_var_for_built_in_types = true
. I think int x = 5;
reads better than var x = 5;
. I do acknowledge that the alignment is better, though.csharp_style_var_when_type_is_apparent = true
.csharp_style_var_elsewhere = true
, at least given MS's awful example: var f = this.Init();
. (Of course, part of the problem there is that the method is poorly named.)In addition, I prefer the first style here, not the second:
[Parameter]
public required SyntaxStyle SyntaxStyle { get; set; }
[Parameter] public required SyntaxStyle SyntaxStyle { get; set; }
[...] In addition, I prefer the first style here, not the second:
[Parameter] public required SyntaxStyle SyntaxStyle { get; set; } [Parameter] public required SyntaxStyle SyntaxStyle { get; set; }
There exists a resharper
editorconfig rule for this. I don't know it of the top of my head but I will look for it.
I'd like to propose some adjustments to the
.editorconfig
. They are in no-way final and are meant as a discussion-starter.This PR is also open to new suggestions for the code style.
Summary of changes:
var
syntax everywhere (*.cs
,*.razor
)