How to solve “Must be MarshalByRefObject” in a good but multiple-inheritance amputated language like C#?

前端 未结 5 589
我在风中等你
我在风中等你 2020-12-18 19:55

How to solve \"Must be MarshalByRefObject\" in a good but multiple-inheritance amputated language like C#?

The problem is very simple, in several cases you just have

5条回答
  •  一整个雨季
    2020-12-18 20:19

    It depends on how you need to get at it. Using a base class that derives from MarshalByRefObject might do it. Aggregation might do it. Without a more concrete example of what you need it's hard to say, but it's a rare case that multiple inheritance would be the only solution to a problem.

提交回复
热议问题