I know nothing of C# so I'm hoping somebody here can help. So my question is how would I add a "," after the fourth character in a string. Something like:
Hell,o?
You can use .Insert():
.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, ","); }
2.1m questions
2.1m answers
60 comments
57.0k users