摘要:
下面是对string类的扩展:public class StringExtend{ //这个是扩展string判断字符串是否符合日期格式 public bool IsDateTime(this string str,params string[] param) { try { DateTime date=ConvertTo.DateTime(str); }Catch() { return false; } return true; } //这个是扩展string根据字符串内容显示不一样的长度 public string ToL... 阅读全文
2012年6月20日 #