Tutorials Navigation

Tutorials :: New :: Popular :: Top Rated

Tutorials: 18,357 Categories: 12

Total Tutorial Views: 42,413,918

Quick and handy debugging snippet

Tutorial Name: Quick and handy debugging snippet  

Category: PC Tutorials

Submitted By: Sega

Date Added:

Comments: 0

Views: 639

Related Forum: PC Building Forum

Share:

This is something that I've started to use recently;

#if DEBUG
                public
#else
                internal
#endif


Basically, if you're in Debug compiling it'll make whatever follows public and if you're not in Debug compiling, it'll make it internal. This can be applied to just about anything;
#if DEBUG
                public
#else
                internal
#endif
                static void Install()
 #if DEBUG
                public
#else
                protected
#endif

virtual bool canGetStream

You can also have more than one modifier, but that's not commonly needed for debugging.

Ratings

Please take one second and rate this tutorial...

Not a Chance
1
2
3
4
5
6
7
8
9
10
Absolutely

Comments

"Quick and handy debugging snippet" :: Login/Create an Account :: 0 comments

If you would like to post a comment please signin to your account or register for an account.