We agree; that's the wole point : It's better to have an exception that
unmanaged behaviour and GC failure. Of course, it's still better to have
an error at build time, but you don't always have what you want ;-)
Now, if you are *really* performance worried (as much C++ developpers are,
generally without any measurement to prove that their worries are
justified ;-), you can replace __try_cast by static_cast and *pray* not to
have an unnoticed invalid cast that will break hell loose in front of the
client.
AFAIK, __try_cast and C# casts do strictly the same thing.
Arnaud
MVP - VC