StringBuilder
is initialized with an invalid argument CS-W1050StringBuilder
constructor has multiple overloads that accept parameters such as string
(value) and int
(capacity). However, if you initialize it with a char
, it gets converted to its int value, thereby invoking the wrong overload of the constructor. It is therefore recommended that you provide a string
instead of char
.
var sb = new StringBuilder('a');
var sb = new StringBuilder("a");