Removing a character from my stringbuilder [duplicate]

You can just decrease the length to shorten the string (C#):

mstrResult.Length -= 1;

EDIT:

After you updated you question, I think I know what you want 🙂 How about this:

mstrResult.Append(rtbResult.Text).Append("})})" + Environment.NewLine);
var index = mstrResult.ToString().LastIndexOf(',');
if (index >= 0)
    mstrResult.Remove(index, 1);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)