[Solved] How do I add a comma after the fourth character in a sentence?


You can use .Insert():

string test = "Hello";
test = test.Insert(4, ",");

You should check if the string is long enough though like so:

if (test.Length > 4) {
     test = test.Insert(4, ",");
}

0

solved How do I add a comma after the fourth character in a sentence?