随笔分类 - CodeHelper
摘要:double num = 2600 * 0.001; double x = Math.Round(2.4, MidpointRounding.AwayFromZero); //结果为2 Console.WriteLine(x); x = Math.Round(2.5, MidpointRounding.AwayFromZero); //结果为3 Console.WriteLine(x); x =
阅读全文
摘要:/// /// 转换数字 /// protected static int CharToNumber(string c) { switch (c) { case "一": return 1; case "二": ...
阅读全文
摘要:/// <summary> /// 删除Excel空列 /// </summary> /// <param name="excelPath">Excel路径</param> /// <param name="columns">是空行但要保留的列</param> /// <returns></retu
阅读全文
摘要:/// /// 按照指定的高和宽生成相应的规格的图片,采用此方法生成的缩略图片不会失真 /// /// 源图路径(物理路径) /// 指定宽度 /// 指定高度 /// 返回新生成的图 public static Image GetReducedImage(string ori...
阅读全文
摘要:string imgPath = @"C:\ZHM01000001400001-01 青龙 白虎.tif"; Image img = Image.FromFile(imgPath); Bitmap tmpbitmap = new Bitmap(img); img = tmpbitmap; string savePath = Path.Combine(Path.GetDirectoryN...
阅读全文
摘要:/// /// 获取程序集中的实现类对应的多个接口 /// /// 程序集 public Dictionary GetClassName(string assemblyName) { if (!String.IsNullOrEmpty(assemblyName)) ...
阅读全文
摘要:点击文本框,选择文件夹,点击确定 下面我们用代码来实现: 首先,我们写一个函数,用递归的方法实现循环遍历,找到文件夹里所有的文件(此处以xml为例) 创建文本框的点击事件 上段代码中 fileList 是一个static变量 老铁,希望可以帮到!!!
阅读全文

浙公网安备 33010602011771号