remove end character of string csharp

Code Example - remove end character of string csharp

                
                        str = str.Remove(str.Length - 1);