在调试 C# 时,为什么不能更改字典键值对的计数?

When Debugging C# why can you not change the count of a dictionary key value pair?

在 C# 中调试时,您可以在 Locals window 中查看值,默认情况下我的数据库有 2 个值,但我需要用 4 个值进行测试。

有没有办法将计数更改为 4

编辑:我无法更改数据库,因为这会使应用程序变得更糟

使用立即数 window,只需键入如下内容:

dictionary.Add("some_key", "some_value");
dictionary.Add("some_key2", "some_value2");