摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Data; 4 using System.Reflection; 5 6 /// 7 /// 将DataTable数据源转换成实体类 8 /// 9 /// 实体 10 public static class ToModel where T... 阅读全文
posted @ 2016-12-24 14:26 欣宇 阅读(4611) 评论(0) 推荐(0) 编辑
摘要: 如果您觉得本文章对你有帮助,请点推荐并关注我吧,让更多人读到本文章,谢谢! 作者: 欣宇 出处: http://www.cnblogs.com/zhang625161495/ Q Q:625161495 点击这里给我发消息(拒绝骚扰) 版权声明:本人博客中未标明转载、原文地址的,其余均为原创博客,版 阅读全文
posted @ 2016-12-24 11:48 欣宇 阅读(1515) 评论(0) 推荐(0) 编辑
摘要: 1 using System.Text.RegularExpressions; 2 3 /// 4 /// 判断字符串是否是int/double 5 /// 6 public static bool IsIntOrDouble(string strNumber) 7 { 8 Regex objNotNumberPattern = new Regex("[^0-9.... 阅读全文
posted @ 2016-12-24 11:28 欣宇 阅读(2184) 评论(0) 推荐(0) 编辑
摘要: 1 /// 2 /// 判断字符串是否是数字 3 /// 4 public static bool IsNumber(string s) 5 { 6 if (string.IsNullOrWhiteSpace(s)) return false; 7 const string pattern = "^[0-9]*$"; 8 Regex rx = new ... 阅读全文
posted @ 2016-12-24 11:27 欣宇 阅读(21085) 评论(3) 推荐(0) 编辑
摘要: 1 /// 2 /// 删除字符串中的中文 3 /// 4 public static string Delete中文(string str) 5 { 6 string retValue = str; 7 if (System.Text.RegularExpressions.Regex.IsMatch(str, @"[\u4e00-\u9fa5]")) 8 ... 阅读全文
posted @ 2016-12-24 11:15 欣宇 阅读(5209) 评论(0) 推荐(0) 编辑