Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- #if DEBUG
- //this only compiles if in DEBUG
- Console.WriteLine("DEBUG")
- #endif
- #if !DEBUG
- //this only compiles if not in DEBUG
- Console.WriteLine("RELEASE")
- #endif
- //This always compiles
- Console.ReadLine()
- }
- #if definied(DEBUG)
- #define DEBUGLOG(message) printf("%s",message);
- #else
- #define DEBUGLOG(message)
- #end if
- #if defined(DEBUG)
- #undef DEBUG
- #endif
- #include <stdio.h>
- #define PI 3.141592654
- int main() {
- printf("%fn", PI);
- }
- #define PRINT(x) printf("%sn", (x))
- /* Then you could say PRINT("Hello, world.n"); and it would
- * be replaced with printf("%sn", "Hello, Worldn");
- */
- #ifdef linux
- /* if linux is defined, this will be compiled. It will be left out if not. */
- #endif
- #if 0
- /* This code will never be included for compilation. */
- #endif
- #define USEFOREACH
- #if USEFOREACH
- foreach(var item in items)
- {
- #else
- for(int i=0; i < items.Length; ++i)
- { var item = item[0];
- #endif
- doSomethingWithItem(item);
- }
- #define PLAYSOUNDS
- #ifdef PLAYSOUNDS
- // Do lots of funk to play a sound
- return true;
- #else
- return true;
Add Comment
Please, Sign In to add comment