|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
BinaryFormatter serialization size.How can I determine the size of the data that a BinaryFormatter will produce
when serializing an object? I basically want to know how many bytes an object with SerializableAttribute will produce if it is serialized to a stream. -- ----------------------------------- Ken Varn Senior Software Engineer Diebold Inc. EmailID = varnk Domain = Diebold.com ----------------------------------- Ken Varn wrote:
> How can I determine the size of the data that a BinaryFormatter will You can't determine that up front, so you have to determine that> produce when serializing an object? I basically want to know how > many bytes an object with SerializableAttribute will produce if it is > serialized to a stream. using a memorystream and checking the size of the stream after serializing the data into the memorystream. FB -- ------------------------------------------------------------------------ Lead developer of LLBLGen Pro, the productive O/R mapper for .NET LLBLGen Pro website: http://www.llblgen.com My .NET blog: http://weblogs.asp.net/fbouma Microsoft MVP (C#) ------------------------------------------------------------------------ |
|||||||||||||||||||||||