CSharp設計模式讀書筆記(10):裝飾模式(學習難度:★★★☆☆,使用頻率:★★★☆☆)...

裝飾模式(Decorator Pattern): 動態地給一個對象增加一些額外的職責,就增加對象功能來說,裝飾模式比生成子類實現更爲靈活。 模式角色與結構: 示例代碼: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CSharp.DesignPatte
相關文章
相關標籤/搜索