remove last character from stringbuilder c# code example
Example 1: c# remove last character from string
string Name = "Teste,"
string ReturnName = "";
ReturnName = Name.Remove(Name.Length - 1);
Example 2: remove last character from string c#
myString = myString.Substring(0, myString.Length-1);
Example 3: how to remove last 3 characters from string in c#
myString = myString.Substring(0, myString.Length-3);
Example 4: how to delete last char from stringbuilder
if(sb.length() > 0){
sb.deleteCharAt(sb.length() - 1);
}