Derive a Class
#include "stdafx.h" #using <mscorlib.dll> 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(); }