How to GetByte from Object without serialization?
I want to keep the properties of controls that the user changes at runtime. (Net windows form application)
I just use BinaryFormatter to serialize the object, it works but some properties are not serializable, so I want to store the object as binary
Note: I am using a third party component without source code
Could you help me?
a source to share
Serializing an object, it stores it as binary. If you're looking for a direct memory dump you're out of luck - it's just not realistic in .NET.
If serialization doesn't work out of the box, you may need to serialize what you can, and then post more information about properties that are not currently serialized. I personally would be a little concerned about how fragile this solution can be - there could be very good reasons for not serializing properties. (.NET binary serialization is pretty fragile to start with ...)
Why not contact the author of the component and ask for advice? They will probably know more about any quirks you may run into than we do.
a source to share