Monthly Archives: November 2008

Default TypeConverters and Objects

Take a look at the following code. Which of the following tests do you think should pass? You might think that type converters could convert any type to an object, but you’d be wrong.  Value types or reference types, it doesn’t matter. All of these tests return false. Neither the object type converter nor any […]

Posted in C# | Leave a comment

Somebody call the Orkin man…

…because it looks like I just ran into a bug.  A compiler bug.  A while back I posted about Assert.ExpectedException, and how that style of exception testing is an improvement over the ExpectedException style.  Here’s the code as a reminder: Simple, right? Not exactly.  One would think that the following test would pass: Strangely, this […]

Posted in C# | 2 Responses