[2005] Save Class to Application Settings
This might be a dumb question but I was just curious if it was possible to save a class that inherits from the CollectionBase class to the application settings.
For example I have an AccountsCollection that inherits CollectionBase and holds account information an is used throughout the system and if a user changes or updates the account. I want to be able to save this information and reload it when app starts again later.
Thanks In Advance.
Re: [2005] Save Class to Application Settings
I'm not 100% percent sure but I think you'd have to add metadata to the class definition to handle serialisation. When an object is saved to the config file through application settings it is serialised. If the system doesn't know how to serialise your class then it won't be able to save it. Like I said, I don't know for sure because I've never tried but that sounds logical to me (unlike most of what I say ;)). I'm sure MSDN has information about saving custom types to the config file.
Re: [2005] Save Class to Application Settings
Darn Internet went out for a long time. Thanks I will take a look into that.