我尝试遍历字典,但它显示了这个错误:
“无法从‘System.Collections.Generic.KeyValuePair’转换为‘string’”。
你能告诉我如何解决这个问题吗?
这是代码:
var dict = new SortedDictionary<string, string>();
foreach(KeyValuePair<string, string> ugh in dict){
.............
}
Run Code Online (Sandbox Code Playgroud)
先感谢您。