Conditional Compilation C# with Example



Conditional Compilation C# with Example

 	#define EXPERIMENTAL
	
	using System;

	namespace CSharpPreprocessor
	{
		class ConditionalCompilation
		{
			static void Main()
			{
				#if PRODUCTION
					Console.WriteLine("This is the perfect code to execute in Production");
				#endif
				
				#if EXPERIMENTAL
					Console.WriteLine("This is the doubtful code to execute in Exprimental");
				#endif
			}
		}
	} 

0 Comment's

Comment Form

Submit Comment