RosettaCodeData/Task/Collections/C-sharp/collections-5.cs

7 lines
324 B
C#

//Create an initialize Dictionary
Dictionary<string, string> dict = new Dictionary<string, string>() { { "Hello", "World" }, { "Key", "Value" } };
//Create Dictionary and add some Key-Value pairs.
Dictionary<string, string> dict2 = new Dictionary<string, string>();
dict2.Add("Hello", "World");
dict2.Add("Key", "Value");