摘要: 定义2数相加方法接收三个参数:数字1,数字2,回调函数 add 先执行2数相加的和,回调函数执行把2数相加和当参数接收 阅读全文
posted @ 2017-10-26 22:28 JaysD 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace ADTO.OA.... 阅读全文
posted @ 2015-11-26 18:02 JaysD 阅读(377) 评论(0) 推荐(1) 编辑
摘要: var model = DataPage.ToPage(lugmpt, myModel.PageIndex.ToInt(), myModel.PageSize.ToInt()); jm.data = model.Select(u=>new { ID=u.ID }); 阅读全文
posted @ 2015-11-26 18:00 JaysD 阅读(780) 评论(0) 推荐(0) 编辑
摘要: 在webapi项目里修改webapiconfig.cs在默认路由上面添加自定义路由 config.Routes.MapHttpRoute( name: "AppWebApi", routeTemplate: "api/{controller}/{action}/{id}", def... 阅读全文
posted @ 2015-11-25 15:32 JaysD 阅读(633) 评论(0) 推荐(0) 编辑
摘要: 有form1 form1里有个textbox1控件有class1类 ,,在class1里面访问form1里面的textbox1控件很容易直接在class 里面 方法里面接收form1 比如1 public void operation(form1 f1)2 3 {4 5 可以直接操作f1就... 阅读全文
posted @ 2015-03-10 16:33 JaysD 阅读(155) 评论(0) 推荐(0) 编辑
摘要: ThreadStart ts = new ThreadStart(delegate()//这里必需为委托 { op.Login(logininfo);//这里可以传多个参数或对象等 }); Thread t = new Thread(ts); t.Start(); 阅读全文
posted @ 2015-03-10 16:26 JaysD 阅读(146) 评论(0) 推荐(0) 编辑
摘要: C# OpenProcess用法 .分类: C#操作内存相关 2011-11-26 23:51 124人阅读 评论(0) 收藏 举报 函数功能:该函数用来打开一个已存在的进程对象,并返回进程的句柄。函数原型:HANDLE OpenProcess(DWORD dwDesiredAccess,BOOL bInheritHandle,DWORD dwProcessId);参数:dwDesiredAccess:访问权限。bInheritHandle:继承标志。dwProcessId:进程ID。C#中使用该函数首先导入命名空间:using System.Runtime.InteropServices;然 阅读全文
posted @ 2012-04-23 13:17 JaysD 阅读(2198) 评论(0) 推荐(0) 编辑
摘要: IEnumerable:实现IEnumerable接口的类,可以支持foreach循环遍历对象的集合元素IEnumerator GetEnumerator()返回可循环访问集合的枚举数。IEnumerator:object Current获取集合中的当前元素。bool MoveNext()将枚举数推进到集合的下一个元素。如果枚举数成功地推进到下一个元素,则为 true;如果枚举数越过集合的结尾,则为 false。void Reset()将枚举数设置为其初始位置,该位置位于集合中第一个元using System;using System.Collections;namespace Console 阅读全文
posted @ 2011-10-19 07:50 JaysD 阅读(233) 评论(0) 推荐(0) 编辑
摘要: View Code 1 using System; 2 using System.Collections; 3 4 public class Person 5 { 6 public Person(string fName, string lName) 7 { 8 this.firstName = fName; 9 this.lastName = lName; 10 } 11 12 public string firstName; 13 public string lastName; 14 } 15 ... 阅读全文
posted @ 2011-10-19 07:47 JaysD 阅读(153) 评论(0) 推荐(0) 编辑
摘要: View Code 1 //用来记录开始和结束的时间 2 DateTime startTime = new DateTime(); 3 DateTime endTime = new DateTime(); 4 5 //定义集合类型ArrayList的一个实例 6 ArrayList list = new ArrayList(); 7 8 //取得当前时间 9 startTime = DateTime.Now;10 11 //★★★★★★★★①使用ArrayList类★★★★★★★★12 //ArrayList的add方法的参数是Object型,13 //当我们把int型作为参数传入的时候... 阅读全文
posted @ 2011-10-19 07:18 JaysD 阅读(94) 评论(0) 推荐(0) 编辑