gpt4 book ai didi

c# - 哪个更好 : dictionary or hashtable

转载 作者:行者123 更新时间:2023-11-30 19:02:50 26 4
gpt4 key购买 nike

我经常混淆 dictionaryhashtable 并希望比较它们,考虑性能成本......

哪个更划算??

最佳答案

在 Java 中,恕我直言,两者都不是可取的。这些是十多年前在 Java 1.0 中添加的集合和在 Java 1.2 中添加的改进集合。

为了性能我建议你使用

Map<Key, Value> map = new HashMap<Key, Value>();

关于c# - 哪个更好 : dictionary or hashtable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8944897/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com