4 Replies
like
const string Path =
#if Win32 #elif Linux
Stack Overflow
C# preprocessor differentiate between operating systems
Is it possible to differentiate between operating systems in C# using preprocessor? like :
#if OS_WINDOWS
//windows methods
#elif OS_MAC
//mac methods
#elif OS_LINUX
//linux methods
#endif
For reference, the
#stuff
is called "pragmas" or "preprocessor directives" in C#roger that√