Is it possible in C# to create a System.Collections.Generic.Dictionary where TKey is unconditioned class and TValue
As itowlson said, you can't declare such a beast, but you can indeed create one:
static IDictionary NewDictionary(TKey key, TValue value)
{
return new Dictionary();
}
static void Main(string[] args)
{
var dict = NewDictionary(new {ID = 1}, new { Column = "Dollar", Localized = "Доллар" });
}
It's not clear why you'd actually want to use code like this.