c# string remove last linebreak code example Example: remove last character from string c# myString = myString.Substring(0, myString.Length-1);