line Directive C# with Example



line Directive C# with Example

 	#define EXPERIMENTAL
	
	using System;

	namespace CSharpPreprocessor
	{
		class ConditionalCompilation
		{
			static void Main()
			{
				#line 100 "DEMO.CS"
				#if EXPERIMENTAL
					#warning "Compiled for experimental version."
				#elif TRIAL
					#error "This is trial version."
				#else
					Console.WriteLine("All in Production version");
				#endif
				
				Console.WriteLine("This is in all versions.");
			}
		}
	} 

0 Comment's

Comment Form

Submit Comment