Unable to constrain generic type
问题 I can't figure out what's happening here. I'm building a wrapper for a Dictionary collection. The idea is that, when the size of the collection is small, it will use a normal in-memory Dictionary; but, when a threshold number of items is reached, it will internally switch to an on-disk Dictionary (I'm using the ManagedEsent PersistentDictionary class). A snippet of the on-disk version is below. When compiling, it fails with the following error: "The type 'T_KEY' cannot be used as type