how to remove characters from a string c# code example
Example 1: c# remove specific character from string
string phrase = "this is, a string with, too many commas";
phrase = phrase.Replace(",", "");
Example 2: c# Remove String In C#
string founder = "Mahesh Chand is a founder of C# Corner";
string first25 = founder.Remove(25);
Console.WriteLine(first25);
String newStr = founder.Remove(10, 12);
Console.WriteLine(newStr);
Example 3: remove control characters from string c#
string input;
string output = new string(input.Where(c => !char.IsControl(c)).ToArray());