1.

Why do we use #warning directives in C#?

Answer»

The #warning DIRECTIVE generates a level one warning from a PARTICULAR location in the code. An example is displayed here:

USING System;

namespace Example { class One { public static void Main(string[] ARGS) { #if (!A)     #warning A is undefined #endif     Console.WriteLine("A warning..."); } } }


Discussion

No Comment Found