相关疑难解决方法(0)

如何重置字典

如果我宣布这样的字典:

private static Dictionary<string, object> aDict = new Dictionary<string, object>();
Run Code Online (Sandbox Code Playgroud)

现在我想在另一个地方使用它.我该如何重置?

aDict = new Dictionary<string, object>(); // like this?

aDict = null; // or like this?
Run Code Online (Sandbox Code Playgroud)

或其他重置样式?

c# dictionary

32
推荐指数
5
解决办法
5万
查看次数

标签 统计

c# ×1

dictionary ×1