C
Claire
I have a base abstract class A which contains several abstract functions
I then have an abstract class B (derived from A) which overrides a small
subset of A's abstract functions
Finally I have a fully functional class C (deriving from B). Class C
overrides the (A's) abstract functions not tackled by its ancestor B.
I am complained at by the compiler, that in C, I have not implemented the
inherited abstract members defined by A. But I overrode these functions in
B!
Is this correct and why?
Claire
public abstract class A
{
public abstract void Function1();
public abstract void Function2();
public abstract void Function3();
}
public abstract class B : A
{
public override void Function1()
{
doodar;
}
}
public class C : B
{
public override void Function2()
{
}
public override void Function3()
{
}
// Compiler complains that C has not implemented Function1
}
I then have an abstract class B (derived from A) which overrides a small
subset of A's abstract functions
Finally I have a fully functional class C (deriving from B). Class C
overrides the (A's) abstract functions not tackled by its ancestor B.
I am complained at by the compiler, that in C, I have not implemented the
inherited abstract members defined by A. But I overrode these functions in
B!
Is this correct and why?
Claire
public abstract class A
{
public abstract void Function1();
public abstract void Function2();
public abstract void Function3();
}
public abstract class B : A
{
public override void Function1()
{
doodar;
}
}
public class C : B
{
public override void Function2()
{
}
public override void Function3()
{
}
// Compiler complains that C has not implemented Function1
}