What is the funniest line of code you ever saw? One of the developers at Barcap wrote the following: line in a C# function
if (this == null)
{
}
It absolutely cracked me up (well... I guess you had to be there).
©2006 Marc Adler - All Rights Reserved
Subscribe to:
Post Comments (Atom)
3 comments:
Actually looks a bit familiar. If there was some code in the block I'd guess it was used to fix a debug breakpoint that the optimizer couldnt eliminate. I used to do things like that in the early days of C programming.
i.e.
if (this == null) // set break here
{
this = null; // never called
}
-craig
Believe me ... it had nothing to do with anything that required thought ...
So what does the Unit test look like for this bit of nasty code ????????
Post a Comment