PC Review


Reply
Thread Tools Rate Thread

Conditional compilation - find the user?

 
 
guy
Guest
Posts: n/a
 
      7th Feb 2008
I am working on an app with a large group of others. I have written the
classes required and currently the public methods on them return 'true' or
another sensibel value. This allows the other developers to code using my
classes while i continue working on them.

What I would like to do is use conditional compilation to cause ome code to
only be compiled if it is run by me or on my box - either would be ok.

While I know how to use #define, #if etc. is there a way of saying something
like:-

#If ThisIsMybox
....
#endIf

or
#If ThisIsMe
....
#endif

Guy

 
Reply With Quote
 
 
 
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      7th Feb 2008
On Feb 7, 1:26 pm, guy <g...@discussions.microsoft.com> wrote:
> I am working on an app with a large group of others. I have written the
> classes required and currently the public methods on them return 'true' or
> another sensibel value. This allows the other developers to code using my
> classes while i continue working on them.
>
> What I would like to do is use conditional compilation to cause ome code to
> only be compiled if it is run by me or on my box - either would be ok.
>
> While I know how to use #define, #if etc. is there a way of saying something
> like:-
>
> #If ThisIsMybox
> ...
> #endIf
>
> or
> #If ThisIsMe
> ...
> #endif


Sounds like you want a new build configuration that defines some token
or other, then use #if with that. Tell other people not to select that
build configuration.

Jon
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Compilation ME Microsoft Dot NET 3 20th May 2005 09:34 AM
Conditional Compilation ME Microsoft Dot NET Compact Framework 4 20th May 2005 09:34 AM
how to do conditional compilation in VB.NET? dee Microsoft Dot NET Framework 3 27th Mar 2005 05:59 AM
Conditional compilation FireStarter Microsoft C# .NET 2 7th Nov 2003 04:21 PM
Conditional Compilation/Conditional Constants chris han Microsoft C# .NET 1 10th Jul 2003 09:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:31 AM.