|
-
Oct 3rd, 2006, 11:07 PM
#1
Thread Starter
Fanatic Member
[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.
-
Oct 3rd, 2006, 11:40 PM
#2
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.
-
Oct 4th, 2006, 10:59 PM
#3
Thread Starter
Fanatic Member
Re: [2005] Save Class to Application Settings
Darn Internet went out for a long time. Thanks I will take a look into that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|