C#去掉或过滤字符串前后的关键词
去掉或过滤字符串前后的关键词代码:
static void Main(string[] args)
{
char[] trimChars = { ' ', 'e', 's' };
string UserResponse = Console.ReadLine();
UserResponse = UserResponse.ToLower();
UserResponse = UserResponse.Trim(trimChars);
Console.WriteLine(UserResponse);
Console.ReadKey();
}