string 类的运用 试试看public static string FormatStr(this string str,int len) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 form["user"] 这个必需是string类型 如果不是那自己改一下相应的 public static class ExtenObj { public static string FormatStr(this string str, int len) //把这里的string改成你对应的类型也行 { string temp = ""; temp = Regex.Replace(str, "[-*(){}';,/!\\[\\]%@]", ""); if (len != 0) temp.Substring(0, len); return temp; } } 弱弱的问: 我想在窗体大小改变时,更改标题??? dreamweaver和.net 新手的问题 谢谢大侠指导 一个初级switch问题 cannot start debugging .unable to find Microsoft Internet Explorer. 一个在windows窗体中导航绑定数据的问题 新人求汉字长度正则表达式代码,感谢赐教!! 什么叫静态类 新手求教,groupBox 看看这个问题 如何在gridview表头添加dropdownlist以便查询? sqlcommand的commandtext中有小于号'<'如何解决
public static class ExtenObj
{
public static string FormatStr(this string str, int len) //把这里的string改成你对应的类型也行
{
string temp = "";
temp = Regex.Replace(str, "[-*(){}';,/!\\[\\]%@]", ""); if (len != 0)
temp.Substring(0, len); return temp;
}
}