2018年1月2日
摘要: System.Object System.ValueType System.IntPtr 1.C#中的IntPtr类型被称之为“平台特定的整数类型”,用于本机资源,例如窗口句柄。 2.资源的大小取决于使用的硬件和操作系统,即此类型的实例在32位硬件和操作系统中将是32位,在64位硬件和操作系统中将是 阅读全文
posted @ 2018-01-02 11:41 笨nora 阅读(14301) 评论(0) 推荐(1) 编辑
  2017年12月19日
摘要: 值类型: int、float、bool、enum隐式派生于System.ValueType struct 显式派生于System.ValueType 引用类型: 数组(派生于System.Array) string(System.String的别名) Class(派生于System.object) 阅读全文
posted @ 2017-12-19 10:48 笨nora 阅读(118) 评论(0) 推荐(0) 编辑
摘要: dic = dt.Rows.Cast().ToDictionary( x => Convert.ToInt32(x["Key"]), x => Convert.ToInt32(x["Value"])); 阅读全文
posted @ 2017-12-19 10:34 笨nora 阅读(635) 评论(0) 推荐(0) 编辑
摘要: public static Bitmap CropImage(Bitmap source, Rectangle section) { //source 参数若来源于Image,一定要用new Bitmap(Image)的形式,而不要强制 //类型转换,否则截取的图片会模糊且区域不对 Bitmap bmp = ne... 阅读全文
posted @ 2017-12-19 10:33 笨nora 阅读(1385) 评论(0) 推荐(0) 编辑
摘要: Floor:向下取整,只取整数部分; Round:四舍六入,遇到五则取偶数; Ceiling:向上取整,只要小数部分大于等于一,均往上加一。 阅读全文
posted @ 2017-12-19 10:32 笨nora 阅读(1740) 评论(0) 推荐(0) 编辑
摘要: class bcpHelper { public static StreamWriter SW_log { get; set; } static string bcpExePath = Environment.GetEnvironmentVariable("programfiles")+ @"\Mi 阅读全文
posted @ 2017-12-19 10:32 笨nora 阅读(596) 评论(0) 推荐(0) 编辑
摘要: var minValueKey=(from d in dic orderby d.Value ascending select d.Key).First() 阅读全文
posted @ 2017-12-19 10:31 笨nora 阅读(665) 评论(0) 推荐(0) 编辑
摘要: var list =dt.AsEnumerable().Select<DataRow, int>(x => Convert.ToInt32(x["列名"])).ToList<int>(); 阅读全文
posted @ 2017-12-19 10:28 笨nora 阅读(1946) 评论(0) 推荐(0) 编辑
摘要: DataTable dt_New = sourceTable.Clone(); DataRow[] drs = sourceTable.Select(filter); foreach (DataRow dr in drs) { dt_New.Rows.Add(dr.ItemArray); } ret 阅读全文
posted @ 2017-12-19 10:27 笨nora 阅读(518) 评论(0) 推荐(0) 编辑
摘要: 1)File类 2)StreamReader类 阅读全文
posted @ 2017-12-19 10:25 笨nora 阅读(2066) 评论(0) 推荐(0) 编辑