M
MuZZy
Hello,
I just started with c# and i am trying to port some java code. Here is a
simple sample of what i have on java:
public abstract class Element {
public Element( Element prev, Element parent, Element child ) {
<some code> }
public abstract double Exec();
}
public abstract class COperator extends Element {
public COperator( Element prev, Element parent, Element child ){
super(prev, parent, child ); // call base class constructor
}
}
So i have a base abstract class Element and inherited class Operator.
Now i try in C#:
public abstract class Element {
public Element( Element prev, Element parent, Element child ) {
<some code> }
public abstract double Exec();
}
public abstract class COperator : Element {
public COperator( Element prev, Element parent, Element child ){
//super(prev, parent, child ); - i don't know how to call base
class constructor here
}
}
C# compiler gives me an error: No overload for method Element takes '0'
arguments.
Can someone please help me?
Thank you,
Andrey
I just started with c# and i am trying to port some java code. Here is a
simple sample of what i have on java:
public abstract class Element {
public Element( Element prev, Element parent, Element child ) {
<some code> }
public abstract double Exec();
}
public abstract class COperator extends Element {
public COperator( Element prev, Element parent, Element child ){
super(prev, parent, child ); // call base class constructor
}
}
So i have a base abstract class Element and inherited class Operator.
Now i try in C#:
public abstract class Element {
public Element( Element prev, Element parent, Element child ) {
<some code> }
public abstract double Exec();
}
public abstract class COperator : Element {
public COperator( Element prev, Element parent, Element child ){
//super(prev, parent, child ); - i don't know how to call base
class constructor here
}
}
C# compiler gives me an error: No overload for method Element takes '0'
arguments.
Can someone please help me?
Thank you,
Andrey