文章分类 -  设计模式

摘要:实现数学运算 快速傅里叶变换其中 Complex是实体类 using System;namespace FFT{ /**//// /// Summary description for Complex. /// public class Complex { float real; float imag; //... 阅读全文
posted @ 2006-11-29 11:16 jhtchina 阅读(213) 评论(0) 推荐(0)
摘要:1 简单工厂模式例:使用逗号,把lastname 和firstname区分开来其中基类Namer: using System;namespace NameFactory{ /**//// /// Summary description for Namer. /// //Base class for getting split names public class ... 阅读全文
posted @ 2006-11-28 18:48 jhtchina 阅读(233) 评论(0) 推荐(0)
摘要:设计模式 第4章《在C#中使用类和对象》代理就是指针函数,本质上是对另一个类中函数的引用,可以分派和使用函数无须知道函数来自与那一个类1 委托delegate private delegate string fTxDelegate(string s); //declare delegate fTxDelegate ftx; //instance of delegate 2类C... 阅读全文
posted @ 2006-11-28 17:25 jhtchina 阅读(282) 评论(0) 推荐(0)
摘要:From :《设计模式》第5章学习设计模式以前必须了解继承的基本概念主程序代码: using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;namespace RectDraw{ /**/... 阅读全文
posted @ 2006-11-28 16:43 jhtchina 阅读(330) 评论(0) 推荐(0)