Click here to Skip to main content
11,500,413 members (70,762 online)
Click here to Skip to main content

Tagged as

Conditional compilation using #if#endif block

, 25 Aug 2010 CPOL 4.1K 1
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 | Terms of Use | Mobile
Web03 | 2.8.150520.1 | Last Updated 26 Aug 2010
Article Copyright 2010 by Ritesh Ramesh
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid