04 2015 档案

摘要:/// /// 在指定的字符串列表CnStr中检索符合拼音索引字符串 /// /// 汉字字符串 /// 相对应的汉语拼音首字母串 public static string GetSpellCode(string C... 阅读全文
posted @ 2015-04-30 14:03 洛晨随风 阅读(599) 评论(0) 推荐(0) 编辑
摘要:tag,记录一行数据的唯一标识,小DEMO: lsShow.Items.Add("洗衣机"); lsShow.Items[0].Tag = "我不愿让你一个人"; lsShow.Items.Add("2012"); lsShow.It... 阅读全文
posted @ 2015-04-29 11:07 洛晨随风 阅读(571) 评论(0) 推荐(0) 编辑
摘要:DataColumn objectOne = new DataColumn("objectOne", typeof(object)); dt.Columns.Add(objectOne);//更改databatle列的类型的方法List item = new List... 阅读全文
posted @ 2015-04-28 20:51 洛晨随风 阅读(315) 评论(0) 推荐(0) 编辑
摘要:事件的创造规则是类型必须是一个委托的类型,也就是说是委托实例化了事件事例代码如下:这是两个以后要被委托的方法:public class EventManager { //第一个方法 public void Add(int i,int j) { ... 阅读全文
posted @ 2015-04-25 09:27 洛晨随风 阅读(600) 评论(0) 推荐(0) 编辑
摘要:private OperatingSystem os = System.Environment.OSVersion;os.Version.Major.ToString();if(gOSv.Version.Major >= 6){ //Win7系统 } 阅读全文
posted @ 2015-04-22 14:28 洛晨随风 阅读(1634) 评论(0) 推荐(0) 编辑
摘要:Entry entry = new Entry(); Int32 iParam; if(Int32.TryParse(entry.ajh,out iParam)) { /*如果转换成功就输出iParam... 阅读全文
posted @ 2015-04-20 10:58 洛晨随风 阅读(235) 评论(0) 推荐(0) 编辑
摘要:foreach (System.Diagnostics.Process p in System.Diagnostics.Process.GetProcessesByName("指定的进程")) { p... 阅读全文
posted @ 2015-04-18 16:22 洛晨随风 阅读(174) 评论(0) 推荐(0) 编辑
摘要:假设有两个List集合,找出集合中重复的部分://检测listX和listY中的重复部分//把X复制到Z避免循环同时操作X从而出现异常 itemX.ForEach(i => itemZ.Add(i)); foreach (Entry en in itemZ) ... 阅读全文
posted @ 2015-04-17 20:56 洛晨随风 阅读(166) 评论(0) 推荐(0) 编辑
摘要:select * from AM_C4_ENTRY t where t.created_by in ( select t.created_by from AM_C4_ENTRY t group by t.created_by having count(t.created_by) > 1) ; 阅读全文
posted @ 2015-04-14 21:18 洛晨随风 阅读(386) 评论(0) 推荐(0) 编辑
摘要://判断不存在就创建目录 ,然后拷贝文件DirectoryInfo di = null;if (!Directory.Exists(n.Attribute("value").Value + goalPath)) { di = Dir... 阅读全文
posted @ 2015-04-11 14:18 洛晨随风 阅读(196) 评论(0) 推荐(0) 编辑
摘要:string result = Regex.Match(str,@"[^\\]+$").Value;//正则表达式this.listBox1.Items.Add(Path.GetFileName(str) + " ");//方法 //读取Excel中数据 到datata... 阅读全文
posted @ 2015-04-03 14:09 洛晨随风 阅读(572) 评论(0) 推荐(0) 编辑
摘要:只遍历子文件夹和根文件夹下面文件目录的方法: DirectoryInfo theFolder = new DirectoryInfo(@"E:\工作\Work");//文件的操作类 FileInfo[] fileRootInfo = theFolder.GetFiles();/... 阅读全文
posted @ 2015-04-03 11:13 洛晨随风 阅读(408) 评论(0) 推荐(0) 编辑

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