Are there any design patterns used in the .NET Framework?

前端 未结 7 888
Happy的楠姐
Happy的楠姐 2020-12-22 18:31

I would like to know: are any GoF design patterns are used in the .NET Framework?

BOUNTY:

I have seen the MSDN link below in an answer. Are

7条回答
  •  孤城傲影
    2020-12-22 19:02

    Yes there are many design patterns used in .Net framework BCL. In fact this is the best Place to look at to learn the design pattern's usage in real term perspective.

    Pattern : Implementation

    Observer Pattern : Implemented as Events & Delegates

    Decorator Pattern: Implemented in System.IO Stream classes

    Iterator Pattern : IEnumerable & Iterator

    Strategy Pattern : Implemented in Linq thru Lambda experssion queries (list.Where(expression))

    Factory Pattern : In System.Net.WebRequest

    Adapter Pattern : TLB Import / RCW (Runtime Calleable wrappers)

    Please check out this video for detailed presentation on this topic.

    https://www.youtube.com/watch?v=riHGGYHVoaQ&list=PL2_Cl8E2bG36PGuBGesHFPVM1s6M02JmN

提交回复
热议问题