remove character in string c# 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: c# remove specific character from string
string phrase = "this is, a string with, too many commas";
phrase = phrase.Replace(",", "");