我有多重继承和MarshallByRefObj马歇尔参考继承
的问题,我有一个问题是,我需要从一个抽象类,MarshallByRefObj
抽象类继承(剥离下来):
public abstract class Drawable : IDrawable
{
//... Several unimportant methods...
public IEnumerable<ICard> Shuffle (IEnumerable<ICard>)
{
//...shuffle the cards here...
}
}
类我试图做,这需要通过参考通过剥离下来WCF 访问,显然...:
public class Deck : Drawable, MarshallByRefObject
{
//... public stuff that implements a deck to include
// search/draw/discard functions...
}
为什么不让Drawable继承自MBRO? – 2011-05-05 22:14:31
C#不支持类的多重继承。但是,您可以继承多个接口。如果你的抽象类提供了实现,那么你需要遵循柯克沃尔的建议,我想。 – essedbl 2011-05-05 22:16:52
在这种情况下,我无法从MBRO制作Drawable继承,因为我无法访问它。 – lassombra 2011-05-06 04:52:03