09 2018 档案

摘要:从学习.NET以来,优雅的编程风格,极度简单的可扩展性,足够强大开发工具,极小的学习曲线,让我对这个平台产生了浓厚的兴趣,在工作和学习中也积累了一些开源的组件,就目前想到的先整理于此,如果再想到,就继续补充这篇日志,日积月累,就能形成一个自己的组件经验库。 分布式缓存框架: Microsoft Ve 阅读全文
posted @ 2018-09-20 14:57 厦门哈韩 阅读(138) 评论(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 厦门哈韩 阅读(98) 评论(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 厦门哈韩 阅读(174) 评论(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 厦门哈韩 阅读(96) 评论(0) 推荐(0) 编辑
摘要:【C#笔札】Tryparse的用法 这是参考读物的上得一个例子。自己仿照做的作业 private void button1_Click(object sender, EventArgs e) { int P_int_Number,i; if (int.TryParse(n1.Text, out P_ 阅读全文
posted @ 2018-09-18 22:46 厦门哈韩 阅读(236) 评论(0) 推荐(0) 编辑
摘要:if (((int)e.KeyChar 57) && (int)e.KeyChar != 8 && (int)e.KeyChar != 46) e.Handled = true; //小数点的处理。 if ((int)e.KeyChar == 46) ... 阅读全文
posted @ 2018-09-18 22:08 厦门哈韩 阅读(310) 评论(0) 推荐(0) 编辑
摘要:.强制退出WinForm程序之Application.Exit和Environment.Eixt MSDN和从网上查资料才得知,Dispose()方法,虽然能释放当前窗体的资源,却不能强制结束循环,要想强制突出当前程序要用:System.Environment.Exit(int exitcode)方 阅读全文
posted @ 2018-09-13 21:28 厦门哈韩 阅读(299) 评论(0) 推荐(0) 编辑
摘要:当从数据库里取出一些数据,然后要对数据进行整合,很容易就会想到: DataTable dt = new DataTable();//假设dt是由"SELECT C1,C2,C3 FROM T1"查询出来的结果 for (int i = 0; i < dt.Rows.Count; i++) { if 阅读全文
posted @ 2018-09-12 14:31 厦门哈韩 阅读(119) 评论(0) 推荐(0) 编辑
摘要:} 阅读全文
posted @ 2018-09-12 14:16 厦门哈韩 阅读(402) 评论(0) 推荐(0) 编辑
摘要:C#代码中实现两个表(DataTable)的关联查询(JOIN) 之前通常都是使用SQL直接从数据库中取出表1和表2关联查询后的数据,只需要用一个JOIN就可以了,非常方便。近日遇到一种情况,两个表中的数据已经取到代码中,需要在代码中将这两个表关联起来,并得到它们横向拼在一起之后的完整数据。 如:表 阅读全文
posted @ 2018-09-12 13:57 厦门哈韩 阅读(719) 评论(0) 推荐(0) 编辑
摘要:在Oracle8i或以上版本中,可以创建以下两种临时表: 1。会话特有的临时表 CREATE GLOBAL TEMPORARY <TABLE_NAME> ( <column specification> ) ON COMMIT PRESERVE ROWS; 2。事务特有的临时表 CREATE GLO 阅读全文
posted @ 2018-09-12 10:57 厦门哈韩 阅读(263) 评论(0) 推荐(0) 编辑
摘要:using System.Data; using System.IO; /// <summary> /// Stream读取.csv文件 /// </summary> /// <param name="filePath">文件路径</param> /// <returns></returns> pu 阅读全文
posted @ 2018-09-11 08:11 厦门哈韩 阅读(700) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示