摘要:
DateTime.Now.ToString("dddd,MMMM dd,yyyy hh:mm:tt",System.Globalization.DateTimeFormatInfo.InvariantInfo)生成的结果为:Thursday, February 11, 2010 14:49:45 阅读全文
摘要:
int offset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).Hours;offset>0:当前时区是“+offset”offset<0 :当前时区是“-offset” 阅读全文
摘要:
1.重写IsRegEx方法:private bool IsRegEx(string regEx, string value){try{Regex regex = new Regex(regEx);if (regex.IsMatch(value))return true;else return false;}catch (System.Exception){return false;}finally... 阅读全文