摘要: public static class StringExtensions { /// <summary> /// 转换为Int32 /// </summary> /// <param name="num"></param> /// <returns></returns> public static int ToInt32(this string num) { int i; return (!Int32.TryParse(num, out i... 阅读全文
posted @ 2013-01-10 12:03 黑冰.org 阅读(222) 评论(0) 推荐(0) 编辑
摘要: public static class DateTimeExtensions { /// <summary> /// 获取格式化日期,默认为 yyyy-mm-dd h:m:s /// yyyy:数字年份,m/mm数字月,d/dd数字日 /// YYYY:汉字年份,如二〇一二,M/MM汉字月,D/DD汉字日 /// </summary> /// <param name="dt">要处理的日期时间</param> /// <param name="sFormat">格式化字符串,以ymd... 阅读全文
posted @ 2013-01-10 12:02 黑冰.org 阅读(346) 评论(2) 推荐(0) 编辑
摘要: public static class Int32Extensions { public static string ToChineseMonth(int num) { if (num == 0 || num > 12) throw new Exception("月份错误"); string[] arr = { "〇", "一", "二", "三", "四", "五", "六", "七", "八&qu 阅读全文
posted @ 2013-01-10 12:02 黑冰.org 阅读(174) 评论(0) 推荐(0) 编辑