我有一个字典,由清单确定:
private Dictionary<List<custom_obj>, string> Lookup;
I m trying to use ContainsKey, but it doesn t seem to be working, and I have no idea why. Here is the debug information from my Visual Studio Immediate Window:
?Lookup.Keys.ElementAt(7)[0]
{custom_obj}
Direction: Down
SID: 2540
?Lookup.Keys.ElementAt(7)[1]
{custom_obj}
Direction: Down
SID: 2550
searchObject[0]
{custom_obj}
Direction: Down
SID: 2540
searchObject[1]
{custom_obj}
Direction: Down
SID: 2550
?Lookup.ContainsKey(searchObject)
false
从我的常识来看,最后的锡石应该是真实的。 我希望,我会在这里提供足够信息......任何想法?
感谢!