Re: conditional directives

Peter Osucha <[email protected]> Wed, 14 Mar 2007 15:33:15 -0400
Newsgroups gmane.comp.windows.devel.dotnet.cx
Message-ID <[email protected]>
Bart and Dino,

Thanks for that pointer.  I had not understood what those 'build'
properties were really used for.  Interesting that you can add more of
your own.

I confess my immediate need was not too substantial - I get tired of
seeing (and waiting for!) a splash screen to appear and go away when
running in the IDE.  Hopefully, I'll find some more appropriate uses for
the conditional compilation options.

peter

-----Original Message-----
From: Discussion relating to the specifics of the C# and Managed C++
languages [mailto:[email protected]] On Behalf Of Dean
Cleaver
Sent: Wednesday, March 14, 2007 3:08 PM
To: [email protected]
Subject: Re: [DOTNET-CX] conditional directives

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Ā®  http://www.develop.com

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