摘要: 事件处理函数一般有两个参数,第一个参数(object sender)为产生该事件的对象的属性Name的值,例如上例单击标题为红色的按钮,第一个参数sender的值为button1。如上例标题为红色的按钮和标题为黑色的按钮使用同一个单击事件处理函数,其事件处理如下:private void butto 阅读全文
posted @ 2016-03-13 00:27 code、sky 阅读(1493) 评论(0) 推荐(0) 编辑
摘要: 一般类型,都是继承自System.Object类,默认情况下,object类的ToString方法会返回当前类的类型的字符串表达形式。但也有例外!!DateTime,它就重写ToString方法,DateTime类型的实例的ToString方法返回的就是一个日期的字符串表达形式,而不是DateTim 阅读全文
posted @ 2016-03-13 00:12 code、sky 阅读(489) 评论(0) 推荐(0) 编辑
摘要: C#的事件机制 当用户输入值后,myname对象的Text属性被赋值,程序执行OnGet()方法,并传递自定义事件类NameEventArgs的对象。而OnGet()方法将触发Get事件,并传递对象自身以及NameEventArgs类的对象作为参数。订阅了Get事件的myname_get()方法被通 阅读全文
posted @ 2016-03-13 00:06 code、sky 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 一 Html.ActionLink("linkText","actionName")该重载的第一个参数是该链接要显示的文字,第二个参数是对应的控制器的方法,默认控制器为当前页面的控制器,如果当前页面的控制器为Products,则 Html.ActionLink("detail","Detail")则 阅读全文
posted @ 2016-03-10 14:42 code、sky 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 一般返回一个model这样@model MvcMusicStore.Models.Album 方法: public ActionResult Details(int id) { var album = storeDB.Albums.Find(id); return View(album); } 这个 阅读全文
posted @ 2016-03-10 13:18 code、sky 阅读(3384) 评论(0) 推荐(0) 编辑
摘要: 工具:VS.net2013、EF6、MVC5、SQLServer2008参考出处:http://www.cnblogs.com/slark/p/mvc-5-get-started-create-project.htmlhttp://www.cnblogs.com/miro/p/4288184.htm 阅读全文
posted @ 2016-03-10 01:52 code、sky 阅读(9993) 评论(2) 推荐(2) 编辑
摘要: class Program { public delegate int AsyncDelegate(int intValue, int intTime);//定义一个委托类型 static int AsyncDeleFun(int intValue, int intTime) ... 阅读全文
posted @ 2015-10-26 17:52 code、sky 阅读(906) 评论(0) 推荐(0) 编辑
摘要: class Program { static void Main(string[] args) { int intWorkerThreas; //定义最大工作线程数 int intCompletionPortThreads; //定义最大I/O线程数 ... 阅读全文
posted @ 2015-10-26 17:00 code、sky 阅读(218) 评论(0) 推荐(0) 编辑
摘要: class Program { static void Main(string[] args) { PriorityClass pc = new PriorityClass(); //实例化PriorityTest类 Thread threadOne = new ... 阅读全文
posted @ 2015-10-26 16:36 code、sky 阅读(1872) 评论(0) 推荐(0) 编辑
摘要: Program1 p1 = new Program1(); Thread th = new Thread(new ThreadStart(p1.ThreadRunMethord));//创建一个新的子线程 if (th.ThreadState != ThreadState.Run... 阅读全文
posted @ 2015-10-26 12:54 code、sky 阅读(853) 评论(0) 推荐(0) 编辑