C
Claire
I'm having real brain failure today.
I've done this lots of times with constructors but not with virtual methods
and the compiler complains because Ive put the :base(foo) after the function
header.
I want to call the BaseResult class to let it write shared data before I let
the derived class write its own data. What am I doing wrong please.
public abstract class BaseResult
{
public virtual void Write(System.IO.BinaryWriter binarywriter)
{
WriteMyData()
}
}
public class MimicResult : BaseResult
{
public override void Write(System.IO.BinaryWriter binarywriter) :
base(binarywriter) /*compiler complains*/
{
// Do I do something here?
}
}
I've done this lots of times with constructors but not with virtual methods
and the compiler complains because Ive put the :base(foo) after the function
header.
I want to call the BaseResult class to let it write shared data before I let
the derived class write its own data. What am I doing wrong please.
public abstract class BaseResult
{
public virtual void Write(System.IO.BinaryWriter binarywriter)
{
WriteMyData()
}
}
public class MimicResult : BaseResult
{
public override void Write(System.IO.BinaryWriter binarywriter) :
base(binarywriter) /*compiler complains*/
{
// Do I do something here?
}
}