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