Here’s another interesting piece of code I’ve just dug up in a C# application I’m reviewing. If you can come up with a bright idea about what those try/catch blocks are supposed to do, you’ve got more imagination than me… 😉 123456789101112131415161718192021222324252627282930class Foo { private int bar; // ...snip... …
Category: Coding fun
Don’t code like this at home, kids
Sometimes when you’re reviewing someone else’s code, you find interesting pieces of “art“. Like the following loop construct in a C# application: 123456789101112 int i = anArray.Length - 1; while (true) { if (i < 0) break; …