.NET interview questions: - What is the use of DEBUG directive?
- By Shiv Prasad Koirala in .Net
- Mar 7th, 2014
- 4
- 0
#Debug is a preprocessor directive. Now many times you want some code to run while you are debugging but you do want those code shipped to production environment.
For instance in the below code we want to display operating system only during debugging but this code we do not want in to be pushed to production server.To achieve this we can use the DEBUG directive.
You can see the below code we have wrapped display operating version code in #if DEBUG condition. This code will be excluded when release compiling happens.
Also see following .NET interview questions video on Debug directive in C#: -
Shiv Prasad Koirala
Visit us @ www.questpond.com or call us at 022-66752917... read more

- By Shiv Prasad Koirala
- Jun 20th, 2012
- 53
- 0
C# threading interview questions: - What is the difference between

- By Shiv Prasad Koirala
- Feb 16th, 2013
- 50
- 0
.NET interview questions and answers: - What is TPL?

- By Shiv Prasad Koirala
- Sep 12th, 2013
- 45
- 0
What is Jquery ? ( ASP.NET Jquery interview questions with answers)

- By Shiv Prasad Koirala
- Jun 4th, 2012
- 29
- 0