using System.Collections;
using System.Collections.Generic;
using System.Collections.Concurrent;
public static void Main()
var concurrentDict = new ConcurrentDictionary<int, string>();
concurrentDict[1] = "Hello";
concurrentDict[int.MaxValue] = "World";
foreach(var pair in concurrentDict)
Console.WriteLine(pair.Value);
var concurrentDictList = new ConcurrentDictionary<string, List<string>>();
concurrentDictList["1"] = new List<string>{"Hello"};
concurrentDictList["int.MaxValue"] = new List<string>{"World"};
concurrentDictList["1"].Add("Bier");
if(!concurrentDictList.ContainsKey("Kaffee"))
concurrentDictList["Kaffee"] = new List<string>();
concurrentDictList["Kaffee"].Add("Arabica");
foreach(var pair in concurrentDictList)
Console.WriteLine(String.Join(", ", pair.Value));