I want to store a regular array in My.Settings. Not an ArrayList, not a StringCollection, just a string Array. Can this be done? If so, how is it done? I can’t seem to find the string array datatype in the settings designer in Visual Studio.
Share
I don’t think you can store a regular array in My.Settings.
My.Settings is intended for just “settings”, such as color, image, etc.
If you have a large array of strings I guess I would store them in a text file, an XML file, or in a SQL server database.
If it is a really short list of strings… I suppose you could store it in my.settings as a single string with a unique character separating each original string.
When you read it back in use the Split() method to break it back up into the original string list.
If you really wanted to store an array of strings in My.Settings, the easist way would probably be to use “StringCollection” for the setting type