Hi,
Small syntax question about X++ development. I have now declared next and it works:
abstract class A
{
public abstract int function1(){}
}
The extended subclass which extends class A is:
class B extends class A
{
public int function1(){ return 10;}
}
From C# I first coded:
class A
{
public abstract int function1(){}
}
However, it seems that the next error is thrown: "Abstract methods may only be declared in abstract classes.". I then tried:
class A
{
public int function1(){ return -1}
}
However, now the function1() is not implemented in class B although it extends class A. -1 is returned instead of 10. I do not see any modifier like override or virtual as used in C#. Do I miss something or is this just how the compiler of X++ works? I know I should RTFM.
J.
*This post is locked for comments
I have the same question (0)