#include "stdafx.h"
#using
using namespace System;
class BaseClass {
public:
virtual void MyFunction() {
Console::WriteLine("Inside Base class");
}
};
class DerivedClass : public BaseClass {
public:
virtual void MyFunction() {
Console::WriteLine("Inside Derived class");
}
};
void main() {
BaseClass base;
DerivedClass derived;
base.MyFunction();
derived.MyFunction();
}