Quote:
|
Originally Posted by NeedHelp
I have about 5-10 things that I save in the registry per form. There are about 5 forms.
I dont understand what binary serialization is. How does that work?
Is it still common to save settings into the registry or is XML used more?
|
Binary serialization basically just dumps the memory contents to a byte stream. You can then save that byte stream as a file on disk, or send it across the network, etc. Since it directly dumps memory, it doesn't have the same limitations as Xml serialization - but it's in a propietary format and isn't human readable.
This seems to be a
decent example of the basics.
I think the ".NET Way" is leaning more and more towards xml config files for user settings. I tend to use binary serialization for caches and persistent collections that I don't want the user messing with. Config files, OTOH, are useful in XML as it's (slightly) easier to comprehend and edit.
.NET 2.0 really steps up the built in config file support for both application settings and user settings. If you want to take advantage of this, here's a
starting point on MSDN to read about the changes.