G
Guest
I am having a problem saving an object in the user.config file of my app (I
use VB and the my.settings namespace to do this FWIW).
The object that I am trying to save is an arraylist.
The arraylist itself holds multiple instances of a structure that I created.
The structure consists of one string, and four colours.
When I first added the arraylist to the settings tab of the "my project"
page, I had no trouble selecting system.collections.arraylist.
I've checked and found that both arraylist and colours should be
serializable. I added " <Serializable()> " to my structure as well.
I get no errors when trying to add an item to the arraylist
(my.settings.myarraylist.insert(0, oneStructure) ) and then saving it
(my.settings.save), but nothing seems to get saved.
If I look at the user.config file, I see the entry for my arraylist
(<setting name="messageCollection" serializeAs="Xml">), but the value tag is
either empty (<value />) or, sometimes mentions something about it holding an
array ("of any type", I think), along with some xml namespaces (which I
forgot to take note of). However, there is no real data in there.
Can anyone help?
thanks,
Doug
use VB and the my.settings namespace to do this FWIW).
The object that I am trying to save is an arraylist.
The arraylist itself holds multiple instances of a structure that I created.
The structure consists of one string, and four colours.
When I first added the arraylist to the settings tab of the "my project"
page, I had no trouble selecting system.collections.arraylist.
I've checked and found that both arraylist and colours should be
serializable. I added " <Serializable()> " to my structure as well.
I get no errors when trying to add an item to the arraylist
(my.settings.myarraylist.insert(0, oneStructure) ) and then saving it
(my.settings.save), but nothing seems to get saved.
If I look at the user.config file, I see the entry for my arraylist
(<setting name="messageCollection" serializeAs="Xml">), but the value tag is
either empty (<value />) or, sometimes mentions something about it holding an
array ("of any type", I think), along with some xml namespaces (which I
forgot to take note of). However, there is no real data in there.
Can anyone help?
thanks,
Doug