The solution is to write an extension method for scripting.dictionary to convert to a .net Dictionary(Of TKey, TValue)
VB.NET
<Extension()>
Public Function ToDictionary(Of T, T2)(dic As Scripting.Dictionary) As Dictionary(Of T, T2)
Return dic.Cast(Of Object)().ToDictionary(Function(i) CType(i, T), Function(i) CType(dic.Item(i), T2))
End Function
C#.NET
[Extension()]
public static Dictionary<T, T2> ToDictionary<T, T2>(Scripting.Dictionary dic)
{
return dic.Cast<object>().ToDictionary(i => (T)i, i => (T2)dic.Item(i));
}
and then simply use
horribleDictionary.toDictionary<int,string>()