C++ Equivalent to VB Casts





























C++ Equivalent to VB Casts

The closest equivalent to the standard VB casting macros (CType and the corresponding CInt, CStr, etc.) are calls to the System::Convert methods if the appropriate method exists, otherwise they are converted to the safe_cast operator in C++/CLI.  The behavior of both the System::Convert methods and safe_cast are subtly different from the VB casting macros though, so you should always test the behavior of your converted C++ code.

 

The VB TryCast operator is converted to the C++ dynamic_cast operator.

If you need to convert from VB.NET to C++/CLI and you are depending on the results being reliable and accurate, then you will want to have Instant C++ VB Edition, the best VB.NET to C++ converter, at your fingertips.

 

 
 
Email your questions and comments to:  info@tangiblesoftwaresolutions.com

[Site Map]        [Home]


Copyright © 1997 - 2009 Tangible Software Solutions Inc.