代码
static void Main(string[] args){string str = "123abc";string strdelete = "abc";string str1 = str.Trim('1');string strc = str1.Trim('c');string str11 = str1.TrimStart('1');string strcc = str1.TrimEnd('c');string strabc = str.Trim(strdelete.ToCharArray());Console.WriteLine(str1);Console.WriteLine(str11);Console.WriteLine(strc);Console.WriteLine(strcc);Console.WriteLine(strabc);Console.ReadLine();}