c# remove char in string code example
Example 1: c# remove character from string at index
string s = "This is string";
s = s.Remove(2, 1);
//Output: Ths is string
string s = "This is string";
s = s.Remove(2, 2);
//Output: Th is string
Example 2: remove control characters from string c#
string input; // this is your input string
string output = new string(input.Where(c => !char.IsControl(c)).ToArray());