0

我在下面有 3 部字典:

Dictionary<string, int> A = new Dictionary<string, int>();
Dictionary<string, int> B = new Dictionary<string, int>();
Dictionary<int, Dictionary<int, int>> C = new Dictionary<int, Dictionary<int, int>>();

我想用默认值 = 0 填充 C 字典,如下所示,我的代码不正确,请帮助我

C = A.ToDictionary(x => x.Value, B.ToDictionary(y => y.Value, y => 0));
4

1 回答 1

3
C = A.ToDictionary(x => x.Value, v=>B.ToDictionary(y => y.Value, y => 0));
于 2013-08-25T16:07:25.420 回答