Can't add keyValuePair directly to Dictionary

后端 未结 8 1083
半阙折子戏
半阙折子戏 2020-12-18 18:45

I wanted to add a KeyValuePair to a Dictionary and I couldn\'t. I have to pass the key and the value separately, which must

8条回答
  •  有刺的猬
    2020-12-18 19:06

    I'm not 100% sure, but I think the internal implementation of a Dictionary is a Hash-table, which means key's are converted to hashes to perform quick look ups.

    Have a read here if you want to know more about hashtables

    http://en.wikipedia.org/wiki/Hash_table

提交回复
热议问题