Remove the last character of a string in C#

PHOTO EMBED

Mon Mar 14 2022 21:34:10 GMT+0000 (Coordinated Universal Time)

Saved by @javicinhio #csharp

using System;
class RemoveCharacter {
  static void Main() {
    string s = "king";
    string result = s.Remove(s.Length-1);
    Console.WriteLine(result);
  }
}
content_copyCOPY

https://reactgo.com/c-sharp-remove-last-char-string/