So I thought long and hard about my initial stab at a multimethod implementation for C#. It was a reasonable proof of concept. However, I read some more on the subject of multiple dispatch and the visitor pattern and came up with a few additional ideas. These are encapsulated in the attached project. I have also reproduced the main source file since this is where most of the action takes place.
This was, for me, an interesting digression into the area of IL generation using System.Reflection.Emit which is something I haven't done since my old Speech Server days.
Here's a summary of what I ended up doing:
For future investigation:
Until next time…