I want to remove last three characters from a string:
string myString = \"abcdxxx\";
Note that the string is dynamic data.
myString.Remove(myString.Length-3);
The new C# 8.0 range operator can be a great shortcut to achieve this.
Example:
var shortenedString = myString[0..^1]