Diagnostic Compilation C# with Example



Diagnostic Compilation C# with Example

 	#define EXPERIMENTAL
	
	using System;

	namespace CSharpPreprocessor
	{
		class ConditionalCompilation
		{
			static void Main()
			{
				#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