NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 88 89 90 91 92 93 Next »
#define

 
  • 0 Vote(s) - 0 Average
#define
colin
Offline

Senior Member

Posts: 683
Threads: 39
Joined: Nov 2003
#1
2004-08-11, 07:51 PM
Can you do #define in C#? I want to emulate this from C

#ifdef DEBUG
#define LOGV(string) \
Logger.Verbose(string);
#else
#define LOGV(string)
#endif

then on the compile include something like -DDEBUG

Its just useful for building in debug for testing then droping the -DDEBUG to remove in for release code,

cheers,
Colin.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,708
Threads: 767
Joined: Nov 2003
#2
2004-08-11, 08:12 PM
No, you cant use #define, but you could write your own function as a logger wrapper. In that function you could #ifdef DEBUG around the call to Logger.Verbose.
colin
Offline

Senior Member

Posts: 683
Threads: 39
Joined: Nov 2003
#3
2004-08-11, 08:40 PM
sounds like a plan. BTW, on the compile line is is -D to specify symbols?

thanks
Colin.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode