Properly Testing Equality
Getting equality correct on a .Net type is a fairly involved process involving adherence to a large set of rules in order to be considered correct. Including
Getting equality correct on a .Net type is a fairly involved process involving adherence to a large set of rules in order to be considered correct. Including
One of the methods I find to be the most useful in .Net is the method Dictionary<TKey,TValue>.TryGetValue. This method is a nice compromise between performance, explicit return vs. exception, and a being verbal about the chance of failure. It returns false on failure and uses an out parameter to return the actual requested value. This leads to the following elegant pattern
I just released an update to VsVim for Visual Studio 2010 RC. This should be available shortly from the extension manager in Visual Studio or it can be downloaded directly at the following link
One piece of feedback I heard in the MVP sessions this week is that debugging deep class hierarchies in C# is painful. By default C# will only display the fields and properties declared on a given type. To get to base class members you must expand the base node. For large hierarchies this can take several rounds of expansions to get to the desired value.
I just released a quick update to VsVim which moves it to the Visual Studio 2010 RC build. There are no functional changes in this release