#region 过滤特殊字符
/// <summary>
/// Delete special symbol
/// </summary>
/// <param name="str">需要过滤的字符串</param>
/// <returns></returns>
public string DelQuota(string str)
{
string result = str;
string[] strQuota = { "~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "`", ";", "'", ",", "/", ":", "/,", "<", ">", "?", "|" };
foreach (string item in strQuota)
{
if (result.Contains(item))
{
result = result.Replace(item, "");
}
}
return result;
}
#endregion
转载于:https://www.cnblogs.com/xiaohaizhuimeng/p/4421259.html