这是起始代码:
Dictionary<string,object> dest=...;
IDictionary<string,object> source=...;
// Overwrite in dest all of the items that appear in source with their new values
// in source. Any new items in source that do not appear in dest should be added.
// Any existing items in dest, that are not in source should retain their current
// values.
...
我显然foreach
可以通过循环遍历源代码中的所有项目来做到这一点,但是在 C# 4.0(可能是 LINQ)中是否有一些速记方法可以做到这一点?
谢谢