gpt4 book ai didi

c# - 没有给出对应于 Dictionary.Add(string, string) 所需形式参数 'value' 的参数

转载 作者:行者123 更新时间:2023-11-30 13:53:59 28 4
gpt4 key购买 nike

<分区>

我尝试构造一个 Dictionary<string, Dictionary<string, string>> 的实例这样,

Dictionary<string,  Dictionary<string, string>> PredictiveTable =
new Dictionary<string, Dictionary<string, string>>(){
{"+", new Dictionary<string, string>() {"E","error"}},
{"*", new Dictionary<string, string>() {"E","error"}},
{"i", new Dictionary<string, string>() {"E","E->TK"}},
{"(", new Dictionary<string, string>() {"E","E->TK"}},
{")", new Dictionary<string, string>() {"E", "error"}},
{"#", new Dictionary<string, string>() {"E", "error"}}
};

但是编译器只是告诉错误信息

CS7036 C# There is no argument given that corresponds to the required formal parameter 'value' of Dictionary<'string, string>.Add(string, string)

而且我之前尝试搜索错误提示,但就是找不到解决方法。

如果有人能帮助我,我将不胜感激。

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