programming-examples/c-sharp/Functions/C# Program to Demonstrate the Working #define Preprocessor.cs

22 lines
437 B
C#
Raw Normal View History

2019-11-15 12:59:38 +01:00
/*
* C# Program to Demonstrate the Working #define Preprocessor
*/
#define B
#define A
#undef A
using System;
class Program
{
static void Main()
{
#if A
Console.WriteLine("'A' is Displayed Based on the undef Directive ");
#elif B
Console.WriteLine("'B' is Displayed Based on the undef Directive");
#endif
Console.ReadLine();
}
}
/*
'B' is Displayed Based on the undef Directive