Conditional compilation - find the user?

G

guy

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
 
J

Jon Skeet [C# MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top