Code:
#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();
}
}
Output:
'B' is Displayed Based on the undef Directive
More C# Programs: