The new “record” type in C# 9 is a very nice addition to the language if one, like myself, like use immutable types where appropriate. Unfortunately, Sonarlint gives of a lot of warnings when a copy of an existing instance is created and a field or two is changed using the “with” expression, like in the code below.
var person = new Person(“Joakim”, “Olsson”);
var brother = person with { FirstName = “David” };
Code like the one above is / will be used heavily by the C# community as more and more people begin to use C# 9 so I think Sonarlint should perhaps tweak the warning somehow?