My ultimate goal is to make a ComboBox with the items from the stored settings. The setting is of the type StringCollection (System.Collections.Specialized.StringCollection).
In the design mode you cant find the Items property for the combobox in the Application settings.
Settings help page: http://msdn.microsoft.com/en-us/libr...4c(VS.80).aspx
My current code does works but not good. But if i can convert the StringCollection to a string array in a better way than i'm doing now the that wold be a good solution.
I have added a setting with the StringCollection type. Then in Form1_Load i do this:
Expand|Select|Wrap|Line Numbers
- StringArr = New String() {"1", "2", "3", "4"}
- My.Settings.Item("StringCollectionName").CopyTo(StringArr, 0)
- ComboBox1.Items.AddRange(StringArr)
The CopyTo:
http://msdn.microsoft.com/en-us/libr...on.copyto.aspx