Visual C++ .NET/Data Type/Hex
A Hex
<source lang="csharp">
- include "stdafx.h"
using namespace System; void main() {
Console::WriteLine ( 0x10 ); // A Hex 10 is a base-10 16 Console::WriteLine ( -0x10 ); // Negative Hex 10 is a base-10 -16
}
</source>
Hex literal assigned
<source lang="csharp">
- include "stdafx.h"
using namespace System; void main() {
Int64 z = 0xFEDCBA9876543210; // Console::WriteLine( z ); Console::WriteLine( z.ToString("x") );
}
</source>