Visual C++ .NET/Data Type/Integer
Convert Integer to string to ToString method
<source lang="csharp">
- include "stdafx.h"
using namespace System; void main() {
Console::WriteLine ( (1234567890).ToString() );
}
</source>
Convert Integer to String to ToString(X)
<source lang="csharp">
- include "stdafx.h"
using namespace System; void main() {
Console::WriteLine ( (0xABCDEF).ToString("X") );
}
</source>
Perform Simple Math
<source lang="csharp">
- include "stdafx.h"
- using <mscorlib.dll>
using namespace System; int main(void) {
int value1 = 10; int value2 = 10; int value3; value3 = ++value1 * 10; Console::WriteLine(value3); Console::WriteLine(value1); return 0;
}
</source>