Click here to Skip to main content
Click here to Skip to main content

Tagged as

Conditional compilation using #if#endif block

, 25 Aug 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
If you need to include different environment variables between production and dev by making use of the #if DEBUG #endif block
 
public void main()
{
Console.WriteLine("Release code");

#if Debug

Console.WriteLine("Debug code");
 
#endif
}

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Ritesh Ramesh
Architect Infosolvex Solutions Inc
Australia Australia
Ritesh is an IT consultant with over ten years of experience in the IT industry varying from consultation, architecture, design, development to technical management. He has a strong background in solutions and applications architecture with a focus on Microsoft’s .Net platform. His area of expertise spans design and implementation of client/server, database and web-based systems. He has worked with C#, ASP.NET 1.1 and 2.0, ADO.NET, Web Services and SQL technology on several enterprise class projects.
 

 

Freedom is not worth having if it does not include the freedom to make mistakes.
Mahatma Gandhi

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web01 | 2.8.141022.1 | Last Updated 26 Aug 2010
Article Copyright 2010 by Ritesh Ramesh
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid