E. Darwin Hartshorn: //Boilerplate

Comment Toggles

I prefer my tools, such as my sprite editors to take up the whole screen.  But a straight-up screenshot of that size would be annoying.

In XNA/Monogame, you set the size of the screen thusly:

 graphics.PreferredBackBufferHeight = 720;
 graphics.PreferredBackBufferWidth = 1280;

Rather than go in and comment in/out these lines every single time I want to take a demonstration screenshot, I often do this:

/**/
graphics.PreferredBackBufferHeight = 720;
graphics.PreferredBackBufferWidth = 1280;
/**/

Then, when I want to disable my screen expansion, I just delete one Nathan Hale from the top comment block.

/*/
graphics.PreferredBackBufferHeight = 720;
graphics.PreferredBackBufferWidth = 1280;
/**/

Thereby turning the whole set into a comment block.

I use this in other ways as well.

thing.Width = calculatedSum /**/ + SOME_CONSTANT /**/;