#include "stdafx.h"
#using
using namespace System;
class BaseClass { virtual void F(){} };
class DerivedClass : public BaseClass {};
int main(void)
{
DerivedClass* a = new DerivedClass;
BaseClass* b = dynamic_cast(a);
if (b != 0)
Console::WriteLine("Conversion to base class successful.");
else
Console::WriteLine("Conversion to base class unsuccessful.");
delete a;
return 0;
}