开发者

Is it possible to extend more then one abstract class?

Is it possible to extend more then one abstract class?

I'm trying to convert the java bytecode library in C#

I figured out in the original java bytecode library it extended 2 interfaces or in my case abstract class (because it has variables).

Doesn't seem to work in C#...

class JClassParser : JInstructions, JConstantTypes
{
}

JInstructions gets extended perfectly.. but JConstantTypes doesn't work..

of course the workaround I have to use it like this.. JConstantTypes.Variable in开发者_StackOverflow class which you are extending from


No, C# has single inheritance only.

However, you could just use Interfaces instead, since that's basically the same thing:

class JClassParser : IInstructions, IConstantTypes
{
    // implementations of the above interfaces
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜