2010年5月16日
摘要: GDI+ .net 阅读全文
posted @ 2010-05-16 21:46 ATP.NET 阅读(1750) 评论(0) 推荐(1) 编辑
  2007年8月25日
摘要: 关于泛型我不想说什么了,这是2.0中最大的改动,使用方法及各方面的评述已经有很多了,我在这只写个最简单的实现,以保证文章的连续性:) using System; using System.Collections.Generic; using System.Text; namespace 泛型 { class Program { static void Main(s... 阅读全文
posted @ 2007-08-25 10:16 ATP.NET 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 微软推荐了一套写事件程序的标准,下面我来简单的演示一下,将要实现如下功能,进行一次for循环,没循环一次,触发一次是事件,将当前循环的次数输出,事件定义及实现类如下: using System; using System.Collections.Generic; using System.Text; namespace 事件 { //定义委托,要注意委托名应以EventHandle结尾,... 阅读全文
posted @ 2007-08-25 10:07 ATP.NET 阅读(377) 评论(0) 推荐(0) 编辑
  2007年8月19日
摘要: 委托是对一类方法的抽象,这类方法有着相同的返回值和参数,我感觉委托解决的关键问题还是过于耦合度的,当然,还有事件处理。声明和使用方法如下(包括匿名方法): using System;using System.Collections.Generic;using System.Text;namespace 委托{ public delegate int mydelegate(int a,int ... 阅读全文
posted @ 2007-08-19 12:34 ATP.NET 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 反射的关键作用在于降低项目的耦合度,其实就是对new的改进,在实例化一个对象的时候,可以完全不知道类本身的信息,这样就可以很灵活的对项目进行改进。下面看一个例子:首先我在D:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\反射\ClassLibrary1\bin\Debug\目录下创建了一... 阅读全文
posted @ 2007-08-19 12:01 ATP.NET 阅读(427) 评论(1) 推荐(0) 编辑
  2007年8月18日
摘要: 实现IEnumerable接口的类可以进行简单迭代,例如foreach语句 using System;using System.Collections.Generic;using System.Text;using System.Collections;namespace IEnumerable接口{ class Program { static void Main(st... 阅读全文
posted @ 2007-08-18 10:49 ATP.NET 阅读(848) 评论(0) 推荐(0) 编辑
摘要: 模型如下:生产线(型号A)———〉生产汽车(型号A)———〉测试汽车(型号A)要求:当更换生产线时对程序的改动要尽可能的少 using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication1{ class Program { static void Ma... 阅读全文
posted @ 2007-08-18 10:32 ATP.NET 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 先列个大体框架吧 using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication11{ class Program { static void Main(string[] args) { throw new MY("... 阅读全文
posted @ 2007-08-18 10:26 ATP.NET 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 类中有抽象的方法,此类即为抽象类,抽象方法必须在子类中被重写 using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication10{ class Program { static void Main(string[] args) { ... 阅读全文
posted @ 2007-08-18 10:23 ATP.NET 阅读(209) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication9{ class Program { static void Main(string[] args) { employee a = new employe... 阅读全文
posted @ 2007-08-18 10:20 ATP.NET 阅读(185) 评论(0) 推荐(0) 编辑