How to write code with invisible ink .... - A world apart from the everday ...

A world apart from the everday ...

Assert.IsTrue(Entries.Count == 0);

How to write code with invisible ink ....

I stumbled on this pretty cool article by Tim Rayburn on the use of System.Diagnostics.Debug ....


"There is one very important thing you need to know about this object and all its methods: You are writing code in invisible ink!  Now I am sure you are going, "that's it, Rayburn has finally gone off the deep end." But hear me out! "

 
class Program
{
  static void Main(string[] args)
  {
    Debug.Assert(true"Vanishing code!");
  }
}

The stuff mentioned herein only applies though if you actually use the "Release" mode when building your production code;

I'm hearing raucous laughter but it is scary how often I come across people building production code in "Debug" mode.

Posted: Jul 20 2007, 07:09 AM by Ryan CrawCour | with no comments
Filed under:
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: