- 博客(13)
- 收藏
- 关注
转载 计算程序执行时间
Stopwatch sw = new Stopwatch();sw.Start();//开始计时//----------------------------------------------------------------//需要计时的运行代码//--------------------------------------------------------...
2015-12-26 20:21:00 114
转载 GDI
using System;using System.Collections.Generic;using System.Drawing;using System.Drawing.Imaging;using System.IO;using System.Linq;using System.Text;using System.Threading.Tasks;...
2015-12-26 17:40:00 128
转载 IO
实现日志写入、读取,文本复制、删除,递归获取文件夹下所有文件program.csusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace TestIO{ c...
2015-12-26 17:24:00 104
转载 字符串拼凑批量Insert SQL语句神BUG
项目中,为了实现删除原有元素再循环插入数据打算使用字符串拼凑的方式拼凑出一段批量写入数据SQL,出现以下神奇的BUG拼凑中某些语句被吞了开启debug查看:第一次拼凑,into后面的语句全部被吞第二次拼凑,语句完全错乱检查代码均是正常,稍微修改,加了一下空格居然神奇的好了转载于:https://www.cnblogs.com/Jarvis...
2015-12-22 01:31:00 122
转载 用逗号分隔的数据转换到数组
string disIds = "1,2,3,4,5,6,7,8,9,";string[] filePath = disIds.Split(',');//去掉最后一位空值string[] filePath2 = new string[filePath.Length - 1]; for (int i = 0; i < filePath.Length-1...
2015-12-21 18:52:00 801
转载 MVC ViewBag传值
1.单值cs public ActionResult Authority() { int targetId = int.Parse(Request.QueryString["id"]);//接收id ViewBag.targetId = targetId; return View(...
2015-12-21 14:09:00 782
转载 接口和抽象类对比
1.接口-interface1.1 接口声明默认以I开头1.2 接口定义只声明方法,不实现具体的方法体1.3 接口默认公开 Public1.4 接口定义行为(约束行为) public interface Imobile //定义接口 { void UserMobile(); } public class...
2015-12-19 15:50:00 93
转载 Partial 同一个命名空间下写两个类名一样的类
Partial可以在同一个命名空间下写两个类名一样的类,把实现模块分隔开public partial class OverTest { .......... } public partial class OverTest { .......... }转载于:https://w...
2015-12-19 03:11:00 794
转载 Override使用对象
Override使用对象的使用对象有三个,为虚方法、抽象方法、Override方法1.虚方法 public class VirtualTest { public virtual void show() //定义虚方法关键词virtual { Console.WriteLine(); ...
2015-12-19 03:07:00 87
转载 委托
委托关键字:delegate*多播委托调用如果有带返回值只会返回最后一个,基本多播委托不带返回值--用于约束方法返回值、类型 描述方法 public class TestDelegate : System.MulticastDelegate//委托继承自System.MulticastDelegate类,约束方法的模版,可不使用 { ...
2015-12-18 14:32:00 77
转载 MVC下动态加载Ztree
view<head> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>...
2015-12-17 01:35:00 139
转载 验证数据是否为空
<script type="text/javascript"> function xuanzhe() { var User = document.getElementById('Txt_User').value; var Pwd = document.getElementById('T...
2015-12-15 16:35:00 186
转载 Cookie读写
config<configuration><appSettings><add key="UserCookie" value="UserName"/></appSettings></configuration>.cs//读取判断cookie为空为cookie赋一个值 protected ...
2015-12-15 01:39:00 67
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人