Why is a .net generic dictionary so big
- by thefroatgt
I am serializing a generic dictionary in VB.net and I am very surprised that it is about 1.3kb with a single item. Am I doing something wrong, or is there something else I should be doing? I have a large number of dictionaries and it is killing me to send them all across the wire. The code I use for serialization is
Dim dictionary As New Dictionary(Of Integer, Integer)
Dim stream As New MemoryStream
Dim bformatter As New BinaryFormatter()
dictionary.Add(1, 1)
bformatter.Serialize(stream, dictionary)
Dim len As Long = stream.Length