the first can produce no code at all, that helps to have a code comparable only in some conditions, for instance only on windows but not on linux etc
– brunoJan 02 '19 at 18:48
1
Conditional compilation with the preprocessor directive `#if` happens at compile-time. The `if` statement is done at run-time.
– Some programmer dudeJan 02 '19 at 18:48
2
Possible duplicate. Check this link
[Advantages of Conditional Compilation](https://stackoverflow.com/questions/17007241/advantages-of-conditional-preprocessor-over-conditional-statements)
– Shiva2794Jan 02 '19 at 18:48