Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main() {
|
||||
var baseData = new Dictionary<string, object> {
|
||||
["name"] = "Rocket Skates",
|
||||
["price"] = 12.75,
|
||||
["color"] = "yellow"
|
||||
};
|
||||
var updateData = new Dictionary<string, object> {
|
||||
["price"] = 15.25,
|
||||
["color"] = "red",
|
||||
["year"] = 1974
|
||||
};
|
||||
var mergedData = new Dictionary<string, object>();
|
||||
foreach (var entry in baseData.Concat(updateData)) {
|
||||
mergedData[entry.Key] = entry.Value;
|
||||
}
|
||||
foreach (var entry in mergedData) {
|
||||
Console.WriteLine(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue