Very often during development we need to remove the last character from a string.
It could be a trailing slash or a trailing comma as a result (side effect ?) of building delimited strings.
There are many ways to do that in C#, however I like the following one for its simplicity and good performance:
str.Remove(str.Length - 1, 1);
Monday, March 10, 2008 3:36 AM