From System::String^ to int
From int to System::String^
System::String^ str = num.ToString(); // int to System::String^
For all the other data types, similar ways can be adopted.
In C++/CLR development, converting between native integer types and the managed System::String^ type is a common task. To convert a System::String^ to an int, developers can utilize the static int::Parse() method, passing the string as an argument. Conversely, transforming an int into a System::String^ is straightforward by calling the ToString() method directly on the integer variable. These conversion patterns are generally applicable across various other data types within the C++/CLR environment.
System::String^ str = num.ToString(); // int to System::String^
For all the other data types, similar ways can be adopted.
Thanks a lot!