3 ms·
How do you create a hash table where the value is an action that depends on the type of the value? The best you can do is something like Dictionary<Type, Action
by svick 10y ago
How do you create a hash table where the value is an action that depends on the type of the value? The best you can do is something like Dictionary<Type, Action<object>> and use casting in the action, but that's much worse than C# 7.0 switch.