SA1000: Spacing around new()
expression inconsistent with formatter support
#3311
Labels
new()
expression inconsistent with formatter support
#3311
In C# 9.0, you can omit the type name when using
new
in some cases:The SA1000 rule catches
new()
and wants a space likenew ()
because it assumes the next thing should be a type name. It should treatnew()
like a function instead of likenew TypeHere()
with respect to spacing. That would also allow C# formatters, which treatnew()
like a function, to be consistent with StyleCop rules. (Right now they fight a bit.)The text was updated successfully, but these errors were encountered: