In C++ there are predefined macros:
#if defined(_M_X64) || defined(__amd64__) // Building for 64bit target const unsigned long MaxGulpSize = 1048576 * 128
You can add any constants you want to the .csproj file. These can be put into conditional property groups like the one below.
.csproj
TRACE;X64 ...
For my Release x64 build, I have defined a X64 constant that I can use like this:
#if X64 #endif