Convert int32 to int
11,373
Solution 1
Just use a cast:
int32 a = ...;
int b = (int) a;
Note that in principle this might lead to problems if you're running on a platform where int
is less than 32 bits, but that's unlikely if it's a program for Windows.
Solution 2
The C++/CLI keyword int
is an alias for System.Int32
. No conversion or casting is necessary.
Solution 3
int value = (int) int32value;
Author by
Admin
Updated on June 04, 2022Comments
-
Admin almost 2 years
I need to convert int32 to int in VS2008 C++ CLI?
How is this done?