Re: conditional directives

Dean Cleaver <[email protected]> Thu, 15 Mar 2007 08:08:15 +1300
Newsgroups gmane.comp.windows.devel.dotnet.cx
Message-ID <4543A775711185429E59B18055D4167423169C@sxslakl004.xceptionsoftware.com>
Peter,

You can define them at project level in the build properties - I have
some projects where I have 2 debug and 2 release profiles, one with and
one without an additional parameter. An easy one would be to use #if
!DEBUG if you only ever run the code in the IDE in debug mode, but if
you run in release mode also (as I do) you might need your own value.

Dino 

-----Original Message-----
From: Discussion relating to the specifics of the C# and Managed C++
languages [mailto:[email protected]] On Behalf Of Peter
Osucha
Sent: Thursday, 15 March 2007 06:43
To: [email protected]
Subject: [DOTNET-CX] conditional directives

I haven't had much use for these in the past (or better yet, I didn't
understand how they could be used so I didn't use them).

 

Anyway, I have a need with my current development to limit some
functionality while running from the IDE.  I figured I could use
'#if..." to do such a conditional thing.  But there are a few things I
don't understand about doing this.  If I have these #define IDE commands
all over my files, before a release build, I'd have to remove them,
correct (which seems like a pain)?  Is there a better way to
conditionally skip some things while running from the IDE?

 

Peter


===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com