How the Dictionary is internally maintained?

前端 未结 4 666
广开言路
广开言路 2021-01-17 16:57

When i say

Dictionary

is it equivalent to two different arrays such as:

int[] keys =new int[] { 1, 2, 3          


        
4条回答
  •  粉色の甜心
    2021-01-17 17:24

    It's all clearly written on MSDN:

    The Dictionary(Of TKey, TValue) generic class provides a mapping from a set of keys to a set of values. Each addition to the dictionary consists of a value and its associated key. Retrieving a value by using its key is very fast, close to O(1), because the Dictionary(Of TKey, TValue) class is implemented as a hash table.

提交回复
热议问题