Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Preprocessor in C# (#define and conditional operatives)
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 #define PI #define DEBUG #define VC_V10 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { #if (PI) Console.WriteLine("PI is defined"); #else Console.WriteLine("PI is not defined"); #endif /*part 2 of the program*/ #if (DEBUG && !VC_V10) Console.WriteLine("DEBUG is defined"); #elif (!DEBUG && VC_V10) Console.WriteLine("VC_V10 is defined"); #elif (DEBUG && VC_V10) Console.WriteLine("DEBUG and VC_V10 are defined"); #else Console.WriteLine("DEBUG and VC_V10 are not defined"); #endif } } }
run
|
edit
|
history
|
help
0
latest Iequatable
Move 2 ushort to 1 int
Hzzz
Array Foreach with sum
ConvertDotNetGuidToOracleGuid
haha
ASCII table generator
Fórum ➡ Filling in a DataTable from a list of KVP's ♦
Problem: on_off
wyliczenie 1 dnia tygodnia