<分区>
我尝试构造一个 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)
而且我之前尝试搜索错误提示,但就是找不到解决方法。
如果有人能帮助我,我将不胜感激。