How to handle a class you want to extend which is sealed in the .NET library?

前端 未结 7 1388
礼貌的吻别
礼貌的吻别 2021-01-02 02:54

I was reading somewhere about how to handle the issue of wanting to extend a sealed class in the .NET Framework library.

This is often a common and useful task to do

相关标签:
7条回答
  • 2021-01-02 03:42

    Maybe use the Decorator pattern?

    Other than extension methods, this is the only sensible technique I can think of.

    0 讨论(0)
提交回复
热议问题