Making Equality Testing Simple

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 Object.Equals overrides on reference types must return false for null values Object.Equals overrides must return false for incompatible types Excluding null cases x.Equals(y) must be the same as…

4

Dictionary<TKey,TValue>.TryGetValue and Anonymous Types

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…

7

VsVim Update Released (Version 0.7.2)

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 Link: http://visualstudiogallery.msdn.microsoft.com/en-us/59ca71b3-a4a3-46ca-8fe1-0e90e3f79329 New Features Key mapping: map, remap, noremap and there many variations are now supported Reading vimrc  files on startup…

0

Flattening class hierarchies when debugging C#

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…

1

VsVim Update Released for RC (Version 0.7.1)

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 Link: http://visualstudiogallery.msdn.microsoft.com/en-us/59ca71b3-a4a3-46ca-8fe1-0e90e3f79329

6

VsVim Update Released (Version 0.7.0)

I just released an update to VsVim for Visual Studio 2010 Beta2.  This should be available shortly from the extension manager in Visual Studio or it can be downloaded directly at the following link Link: http://visualstudiogallery.msdn.microsoft.com/en-us/59ca71b3-a4a3-46ca-8fe1-0e90e3f79329 New Features Visual Mode Support Character, Line and Block Mode All movement commands supported Basic insert-delete operations added Command…

0

Having fun with events in F#

Recently I ran into a situation where I needed to handle some events in F# in a special way.  In this particular case I wanted to be able to disable and re-enable my handler based on changes in the program.  Essentially the C# equivalent of continually adding and removing the handlers.  I started by using…

1

Easier script deployment in PowerShell 2.0

If you can’t tell from reading entries in my blog I’m a bit of a script junkie.  I loathe typing out the same command sequence more than once.  As such I go to great lengths to script as much as possible in life.  I also enjoy sharing my scripts with other members of my team….

1

The many cases of ByRef

One of the overlooked or simply misunderstood features of the VB language is calling a function which has a ByRef parameter.  Most languages support only a single method of passing parameters by reference [1], that is the scenarios directly supported by the CLR.  The CLR has a lot of restrictions on the type of values…

0

VsVim Update Released (Version 0.6.0)

I just released an update to VsVim for Visual Studio 2010 Beta2.  This should be available shortly from the extension manager in Visual Studio or it can be downloaded directly at the following link Link: http://visualstudiogallery.msdn.microsoft.com/en-us/59ca71b3-a4a3-46ca-8fe1-0e90e3f79329 New Features Normal Mode Commands: Y,Delete, Arrow Keys, gP, gp, z<CR>,zt, z., zz, z-, zb Command Mode Commands: d[elete],…

0