C# – Remove first or last character from a string
Use string.Remove() to remove character(s) from a string based on their index, such as the first or last character. This method has two parameters: string.Remove() returns a new string with the characters removed. I’ll show examples below. Remove the first character from a string To remove the first character, use string.Remove(startIndex: 0, count: 1), like … Read more