我在VB.net中序列化一個通用字典,我很驚訝它的單個項目大約是1.3kb。我做錯了什麼,還是有什麼我應該做的?我有大量的字典,它們都是通過電線發送給我的。我用於序列化的代碼是爲什麼.net通用字典如此之大
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