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
}
精彩评论