Bugs Are Features Too

It’s surprising how many bugs on Microsoft Connect are closed as Won’t Fix with a reason that fixing the bug would be a breaking change. The logic is that someone could be dependant on the errant behaviour and thus changing it would cause their code to break. Here’s some samples. TypeConverter.IsValid(Object).  This method is described as “Returns whether the given value is valid for this type”.  But, this results in true:             TypeConverter typeConverter = TypeDescriptor.GetConverter(typeof(int));             Console.WriteLine(typeConverter.IsValid(“ten”)); Based on the description of IsValid that this is what was intended:              Debug.Assert(false == typeConverter.IsValid(“ten”), … Continue reading Bugs Are Features Too

Drag-copying in Visual Studio Solution Explorer.

NOTE: I’ve tried this in Visual Studio 2008 (VS2k8), I’m assuming the same thing happens in Visual Studio 2005 (VS2k5). In the process of refactoring, it’s *very* common for me to rename a type.  This is most easily done by renaming the file in the Solution Explorer (SE)–which renames the file, the type, and and any uses of the type in the entire solution. Occasionally, I need to create a new type based on another.  Copying an abstract type in order to implement the abstract type is often handy–I just fill in the abstract members (and delete “abstract”) in the … Continue reading Drag-copying in Visual Studio Solution Explorer.

Resharper Isn’t Always Smart

I was writing some code today, essentially like this: public class MyClass {     private int value;     public MyClass(int value)     {         this.value = value;     }     public static bool operator==(MyClass left, MyClass right)     {         return left.value == right.value;     }       public static bool operator !=(MyClass left, MyClass right)     {         return !(left == right);     } }     //…     MyClass myClass1 = new MyClass(1);     MyClass myClass2 = new MyClass(1);     if((Object)myClass1 != (Object)myClass2) // “Type cast is reundant”     {         Console.WriteLine(“not equal”);     } … Continue reading Resharper Isn’t Always Smart