One thing you can do is go into Configuration Manager in Visual Studio and instead of the standard configuration of any CPU, create separate ARM / x86 / x64 configurations and in the project properties / conditional compilation symbols define a symbol that is different for ARM compared to x86 / x64 configurations. Then you can just check it in your code using the #if #else #endif preprocessor directives.
source
share