Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about preprocessor directives

Status
Not open for further replies.

kmfna

MIS
Sep 26, 2003
306
US
Hello all,

I was curious if it is possible to create a header file, much like in c++ that could contain all of my preprocessor directives that I need. I have about 14 forms that are going to need this conditional setup, and didn't want to have to duplicate the #define 14 times. They are logically broken apart by need, but need a common directive. I would do this with a global variable, but I need to be able to reference the cases outside of functions for NUnit testing.

ie:
#ifdef TEST1
[ExpectedException(type1, "Exception Text for TEST 1")]
#elif TEST2
[ExpectedException(type2, "Exception Text for Test 2")]
...
#endif

Any help with this would be greatly appreciated.

I hope everyone is having a great weekend!
-Kevin

- "The truth hurts, maybe not as much as jumping on a bicycle with no seat, but it hurts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top