摘要: public static void CheckDirectoryExistAndCreate(string directory) { if (System.IO.Directory.Exists(directory) == false) { System.IO.Directory.CreateDi 阅读全文
posted @ 2018-10-25 08:55 厦门哈韩 阅读(151) 评论(0) 推荐(0)
摘要: /// <summary> /// 读取csv文件 /// </summary> /// <param name="csvPath">string 标识的 csv文件路径</param> /// <returns>返回的读取的 csv 文件的行集合</returns> public static s 阅读全文
posted @ 2018-10-25 08:41 厦门哈韩 阅读(114) 评论(0) 推荐(0)
摘要: [WinForm] VS2010发布、打包安装程序(超全超详细) 2017年02月17日 21:47:09 y13156556538 阅读数:16487更多 个人分类: C#winform [WinForm] VS2010发布、打包安装程序(超全超详细) 2017年02月17日 21:47:09 y 阅读全文
posted @ 2018-10-16 08:17 厦门哈韩 阅读(134) 评论(0) 推荐(0)
摘要: 如图: //1.添加一个超链接列,并控制其大小不可改变,固定大小 DataGridViewLinkColumn dgvlcOprate = new DataGridViewLinkColumn(); dgvlcOprate.HeaderText = "操作"; dgvlcOprate.Width = 阅读全文
posted @ 2018-10-10 14:10 厦门哈韩 阅读(167) 评论(0) 推荐(0)
摘要: for (int i = 0; i < DataGridView1.SelectedRows.Count; i++) { //第i行第一列 String ai1= DataGridView1.SelectedRows[i].Cells[0].Value.ToString(); //第i行第二列 St 阅读全文
posted @ 2018-10-10 11:41 厦门哈韩 阅读(147) 评论(0) 推荐(0)
摘要: 取文件名 ExtractFileName(FileName); ExtractFileName(FileName); ExtractFileName(FileName); 取文件扩展名: ExtractFileExt(filename); ExtractFileExt(filename); Extr 阅读全文
posted @ 2018-10-08 09:06 厦门哈韩 阅读(309) 评论(0) 推荐(0)
摘要: 从学习.NET以来,优雅的编程风格,极度简单的可扩展性,足够强大开发工具,极小的学习曲线,让我对这个平台产生了浓厚的兴趣,在工作和学习中也积累了一些开源的组件,就目前想到的先整理于此,如果再想到,就继续补充这篇日志,日积月累,就能形成一个自己的组件经验库。 分布式缓存框架: Microsoft Ve 阅读全文
posted @ 2018-09-20 14:57 厦门哈韩 阅读(143) 评论(0) 推荐(0)
摘要: if (((int)e.KeyChar < 48 || (int)e.KeyChar > 57) && (int)e.KeyChar != 8 && (int)e.KeyChar != 46) e.Handled = true; //小数点的处理。 if ((int)e.KeyChar == 46) 阅读全文
posted @ 2018-09-20 10:22 厦门哈韩 阅读(103) 评论(0) 推荐(0)
摘要: c# DLL封装并调用 1.封装自己的dll; a.打开visual studio - 文件 - 新建 - 项目- 类库 - 名称MyTestDll; b.右键Class1.cs - 修改为 TestDll.cs; c.在里面写一个方法,如: namespace MyTestDll{ public 阅读全文
posted @ 2018-09-20 09:30 厦门哈韩 阅读(181) 评论(0) 推荐(0)
摘要: C#几个经常用到的字符串的截取 string str="123abc456";int i=3;1 取字符串的前i个字符 str=str.Substring(0,i); // or str=str.Remove(i,str.Length-i); 2 去掉字符串的前i个字符: str=str.Remov 阅读全文
posted @ 2018-09-18 22:59 厦门哈韩 阅读(100) 评论(0) 推荐(0)