Ive got an empty string s = "";
Ive got a char b = '0';
char b is in a loop so changes after every, I want to keep adding that char b to the string s,
For example, after the first loop string s = "0" after second round s = "01"
In Java its simple to do that for an empty string with string s += char b; Couldnt find anything like that on C#, is there an easier way than building a string builder or making a dummy string?
StringBuilder. Concatenating to astringin a loop is a bad idea as it can cause performance issues from creating a bunch of temporystringobjects.StringBuilder?string += charworks in C#, too; if you are having issues please post your exact code.