摘要:验证字符串格式 1)判断字符串是否是常见数据类型,decimal,foalt,double,datetime,int等等 2)验证字符串符合特定规则 (1)邮箱地址,IP地址 (2)纯数字,纯字母(大写字母/小写字母),数字与字母 (3)电话号码,手机号码,出生日期 电子邮件格式、固定电话号码和手机
阅读全文
随笔分类 - C#
C# Study Notes
摘要:var query = (from x in a.AsEnumerable() join y in b.AsEnumerable() on x.Field("col1") equals y.Field("col1") select new { col1= y.Field("col1"), col2=x.Field("col2") }).To...
阅读全文
摘要:DateTime ConvertDate = DateTime.ParseExact("20140504", "yyyyMMdd", null, System.Globalization.DateTimeStyles.AllowWhiteSpaces).ToString("yyyy-MM-dd"); DateTime.ParseExact("18/05/2014", "dd/MM/yyyy"...
阅读全文
摘要:class A { public int id { get; set; } public string name { get; set; } } class B { public int id { get; set; } public int age { ge...
阅读全文
摘要:private static void DataTableToSQLServer( DataTable dt) { string connectionString = GetConnectionString(); using (SqlConnection destinationConnection =new Sql...
阅读全文
摘要:SqlBulkcopy Loop Insert
阅读全文
摘要:自定义IniFile操作类 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; using System
阅读全文
摘要:窗体起始位置为顶部中间,WinForm居中显示: 其他注意点: 通过指定窗体Locaiton来,设定窗体位置 创建窗体时, 设置宽度和高度 获取屏幕大小(using System.Drawing)
阅读全文
摘要:通过List<String>动态传递参数 调用 动态 传递给sqlparamter <略>
阅读全文
摘要:private void bindTreeView1() { string sql = "select * from dm_category"; DataTable dt = db.ExecuteDataTable(sql, CommandType.Text, null); DataRow[] dr
阅读全文
摘要:Solution1://In Fill DataGridViewEvent : // In Button Event put these codes: datagridview 中的checkbox列是否被选中 反选
阅读全文
摘要:1.数据库连接(常用连接方法,示例) 1 string dbPath = Environment.CurrentDirectory + "/test.db";/*指定数据库路径 */ 2 using(SQLiteConnection conn = new SQLiteConnection("Data
阅读全文
摘要:1.SQLLite如何集成在C#中 2.相关C#与SQLLite资源,及说明 3.简单示例
阅读全文

浙公网安备 33010602011771号