摘要: Stopwatch sw = new Stopwatch();sw.Start();//开始计时//----------------------------------------------------------------//需要计时的运行代码//-----------------------... 阅读全文
posted @ 2015-12-26 20:21 时代码农 阅读(213) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Drawing;using System.Drawing.Imaging;using System.IO;using System.Linq;using System.Text;us... 阅读全文
posted @ 2015-12-26 17:40 时代码农 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 实现日志写入、读取,文本复制、删除,递归获取文件夹下所有文件program.csusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks... 阅读全文
posted @ 2015-12-26 17:24 时代码农 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 项目中,为了实现删除原有元素再循环插入数据打算使用字符串拼凑的方式拼凑出一段批量写入数据SQL,出现以下神奇的BUG拼凑中某些语句被吞了开启debug查看:第一次拼凑,into后面的语句全部被吞第二次拼凑,语句完全错乱检查代码均是正常,稍微修改,加了一下空格居然神奇的好了 阅读全文
posted @ 2015-12-22 01:31 时代码农 阅读(404) 评论(0) 推荐(0) 编辑
摘要: string disIds = "1,2,3,4,5,6,7,8,9,";string[] filePath = disIds.Split(',');//去掉最后一位空值string[] filePath2 = new string[filePath.Length - 1]; for (in... 阅读全文
posted @ 2015-12-21 18:52 时代码农 阅读(1564) 评论(0) 推荐(0) 编辑
摘要: 1.单值cs public ActionResult Authority() { int targetId = int.Parse(Request.QueryString["id"]);//接收id ViewBag.targetId = ta... 阅读全文
posted @ 2015-12-21 14:09 时代码农 阅读(1820) 评论(0) 推荐(0) 编辑
摘要: 1.接口-interface1.1 接口声明默认以I开头1.2 接口定义只声明方法,不实现具体的方法体1.3 接口默认公开 Public1.4 接口定义行为(约束行为) public interface Imobile //定义接口 { void UserMobile();... 阅读全文
posted @ 2015-12-19 15:50 时代码农 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Partial可以在同一个命名空间下写两个类名一样的类,把实现模块分隔开public partial class OverTest { .......... } public partial class OverTest { .......... 阅读全文
posted @ 2015-12-19 03:11 时代码农 阅读(511) 评论(0) 推荐(0) 编辑
摘要: Override使用对象的使用对象有三个,为虚方法、抽象方法、Override方法1.虚方法 public class VirtualTest { public virtual void show() //定义虚方法关键词virtual { ... 阅读全文
posted @ 2015-12-19 03:07 时代码农 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 委托关键字:delegate*多播委托调用如果有带返回值只会返回最后一个,基本多播委托不带返回值--用于约束方法返回值、类型 描述方法 public class TestDelegate : System.MulticastDelegate//委托继承自System.MulticastDel... 阅读全文
posted @ 2015-12-18 14:32 时代码农 阅读(137) 评论(0) 推荐(0) 编辑