首页 > 代码库 > DesignPattern_Creational_Prototype

DesignPattern_Creational_Prototype

void Main(){    Prototype p1=new Prototype();    Prototype p2=p1.Clone() as Prototype;    object.ReferenceEquals(p1,p2).Dump();}class Prototype:ICloneable{    public object Clone(){        return MemberwiseClone();    }}

 

DesignPattern_Creational_Prototype