通用字典如下:
public class ConcurrentDictionary<TKey, TValue> : IDictionary<TKey, TValue>
具体的字典可以如下:
var container = new ConcurrentDictionary<string, Unit>();
var container = new ConcurrentDictionary<string, CustomUnitClass>();
那么,如何检查某些字典是否属于通用字典类型?
object obj = GetObj(); // obj is some of many dictionaries
if(obj is ?)
先感谢您。