今天查bug的时候,遇到一个问题,一个Dictionary<int[],string>数据结构,在使用key取它的value时: var tempVar = _dic[key]; 发生崩溃.跟进去看看,发现不对啊,key是有的啊,怎么回事?然后并不可能是VS的问题.仔细查了才发现,原来用作索引的key,并不是Dictionary里的keys里的key. 简单地说,就是Dictionary里用1,2,3作为key,而传入的key是:1',2',3'.这样当然是找不到的.由此,引发的想到引用类型和…