[RESOLVED] [2008] StringDictionary saved in My.Setting? (Object reference error)
I have System.Collections.Specialized.StringDictionary set up in My.Settings.
However when I try to add to it, I get the error "Object reference not set to an instance of an object." I have not been able to figure out how to get around this one but im sure someone here knows exactly whats wrong.
Thank you very much for any help!
Re: [2008] StringDictionary saved in My.Setting? (Object reference error)
do you mean a System.Collections.Specialized.StringCollection?
have a look at the my.settings stringcollections link in my signature
Re: [2008] StringDictionary saved in My.Setting? (Object reference error)
Works great. Slightly modified, but the link in your sig showed me how to do it.
Code:
If My.Settings.Stuff Is Nothing Then
My.Settings.Stuff = New Specialized.StringDictionary
End If
My.Settings.Stuff.Add("TheStuff","Cant get enough, of the stuff")
My.Settings.Save()
You been a big help paul!