Click here to Skip to main content
12,446,746 members (56,850 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

5K views
1 bookmarked
Posted

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

You may also be interested in...

Pro
Pro

Comments and Discussions

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