| |
Preprocessor 2 |
|
|
/*
C# Programming Tips & Techniques
by Charles Wright, Kris Jamsa
Publisher: Osborne/McGraw-Hill (December 28, 2001)
ISBN: 0072193794
*/
namespace nsPreProc
{
using System;
public class PreProc
{
static public void Main()
{
#if ALTMAIN
#warning Compiling alternate statement
Console.WriteLine ("Using alternate Main()");
#elif OTHERMAIN
#warning Compiling other statement
Console.WriteLine ("Using other Main()");
#else
#warning Compiling main
Console.WriteLine ("Using Main()");
#endif
}
#line 200
#if SHOWERROR
int iVar;
#error This is line 23 but the error report should show line 202
#endif
}
}
|
|
|
Related examples in the same category |
|