摘要:        
using System; namespace Decorator{ abstract class Tank { abstract void Shot(); abstract void Run(); } public class T50:Tank { public override void Short() { } public override void Run() { } }...    阅读全文
        
            posted @ 2006-03-10 17:37
kuailewangzi1212
阅读(199)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
下面是上次写的一个用序列化方法实现的Prototype的深拷贝代码,可供大家参考——注意其中Clone方法不是虚方法,写一次就可以满足所有子类的需要: using System;using System.Runtime;using System.Runtime.Serialization;using System.Runtime.Serialization.Formatters;using Sys...    阅读全文
        
            posted @ 2006-03-10 13:19
kuailewangzi1212
阅读(294)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
using System;using System.Collections;namespace Composite{ public interface IBox { void process(); } public class SingleBox:IBox { public void process() { } } public class ContainerBox:IBox { pub...    阅读全文
        
            posted @ 2006-03-10 11:40
kuailewangzi1212
阅读(270)
评论(0)
推荐(0)
        
        
 
                    
                     
                    
                 
                    
                
 
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号