using System.Collections.Concurrent;
using System.Runtime.Serialization.Formatters.Binary;
public static void Main()
var memoryBefore = GC.GetTotalMemory(false);
var testDictionary = new ConcurrentDictionary<int,ConcurrentDictionary<ushort,bool>>();
for (var i = 0; i < 54; ++i)
var testNestedDictionary = new ConcurrentDictionary<ushort, bool>();
testNestedDictionary.TryAdd(1, true);
testDictionary.TryAdd(i, testNestedDictionary);
var memoryAfter = GC.GetTotalMemory(false);
Console.WriteLine("size of testDictionary is roughly " + (memoryAfter - memoryBefore));