C#基础学习之线程【新手学习 欢迎指正】

摘要: 线程是程序中顺序执行的流程,一个进程可以由多个线程组成,给个线程都可能单独执行创建线程和停止线程using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace threadproj{ class Program { static void Main(string[] args) { //Thread类创建并控制线程,该类的构造函数接受ThreadStart委托,该委托包装希望作为单独线程运行的函数 Thread t = ne... 阅读全文
posted @ 2012-05-21 20:06 Perfect_lsh 阅读(157) 评论(0) 推荐(0)

C#基础学习之事件

摘要: 事件驱动编程 窗体中各种空间都是基于事件编程的,当我们在窗体中添加控件时,编译器为每个控件关联了相应的事件处理程序// // button1 // this.button1.Location = new System.Drawing.Point(54, 63); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 0; this.button1.Text = "button1"; this.b 阅读全文
posted @ 2012-05-21 19:03 Perfect_lsh 阅读(144) 评论(0) 推荐(0)

C#基础学习之委托

摘要: 委托和事件是两个重要的方法,委托是包含方法引用的引用类型,相当于函数指针,但是它是类型安全类型,必须函数签名匹配委托签名。不是直接调用函数,而是使用委托指向该函数,通过调用委托来调用该函数。最重要实现一个叫回调的技术,该技术表示在某个函数结束执行时,对特定函数执行调用用以通知其执行已经完成。定义:delegate 返回类型 委托名(签名,,);注意:没有函数体委托的优点就是可以使用委托调用它指向的任何函数,并且在实际运行之前都不需要确切的了解它调用的函数。可以讲委托作为形参传递给方法using System;using System.Collections.Generic;using Syst 阅读全文
posted @ 2012-05-21 11:19 Perfect_lsh 阅读(190) 评论(0) 推荐(0)

C#基础学习之继承和扩展方法

摘要: 类的继承目的主要实现代码的复用,并且可以扩展已经编写的代码的功能。using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace classproj{ class Program { public abstract class Sharp { //----properties public double length { get;set; } public double width { get; set; } //----methods---- public virtua.. 阅读全文
posted @ 2012-05-21 09:34 Perfect_lsh 阅读(366) 评论(0) 推荐(0)

C#之旅

摘要: 开始学习C#半个多月了,自己算是半路出家的孩子,老板让学习C#,感觉学习的东西太多了,好多都不清楚,研一快结束了,还有两年的时间慢慢学习,循序渐进吧,每天进步一点点,加油! 阅读全文
posted @ 2012-05-17 15:55 Perfect_lsh 阅读(96) 评论(0) 推荐(0)