c# remove chars from 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());
Example 3: c# remove character from string at index
remove char from an index of string