Created
May 20, 2018 13:40
-
-
Save jirolabo/8b671cb71945c0f5aa01c81cc0ca576d to your computer and use it in GitHub Desktop.
Combining Dictionary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim dictA = New Dictionary(Of String, String) From {{"hoge", "fuga"}} | |
Dim dictB = New Dictionary(Of String, String) From {{"foo", "bar"}} | |
Dim dictC = dictA.Concat(dictB).ToDictionary(Function(i) i.Key, Function(i) i.Value) | |
For Each item In dictC | |
Console.WriteLine($"{item.Key} {item.Value}") | |
Next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dictA = new Dictionary<string, string> { { "hoge", "fuga" } }; | |
var dictB = new Dictionary<string, string> { { "foo", "bar" } }; | |
var dictC = dictA.Concat(dictB).ToDictionary(i => i.Key, i => i.Value); | |
foreach (var item in dictC) | |
{ | |
Console.WriteLine($"{item.Key} {item.Value}"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment