M
Marco Segurini
Hi,
Actually I am creating a hierarchy of MANAGED classes.
I like to know if there is way to mark a virtual (abstract) function as
"must be implemented on each derived class".
example:
ref class Test abstract
{
public:
void read() abstract;
};
ref class TestDerived : Test
{
public:
void read() {}
};
ref class TestDerived2 : TestDerived
{
};
int main()
{
TestDerived2^ TD = gcnew TestDerived2();
return 0;
}
I'd like a compile-error for this code considering that 'void read()' is
not implemented for 'TestDerived2' class
Thanks fon any help.
Marco.
Actually I am creating a hierarchy of MANAGED classes.
I like to know if there is way to mark a virtual (abstract) function as
"must be implemented on each derived class".
example:
ref class Test abstract
{
public:
void read() abstract;
};
ref class TestDerived : Test
{
public:
void read() {}
};
ref class TestDerived2 : TestDerived
{
};
int main()
{
TestDerived2^ TD = gcnew TestDerived2();
return 0;
}
I'd like a compile-error for this code considering that 'void read()' is
not implemented for 'TestDerived2' class
Thanks fon any help.
Marco.