Personally, as a fan of data-binding, I would probably do it like this:
vb.net Code:
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'Bind the settings collection via a BindingSource.
BindingSource1.DataSource = My.Settings.ComboBox1Items
ComboBox1.DataSource = BindingSource1
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
'Add a new item from a TextBox.
BindingSource1.Add(TextBox1.Text)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
'Remove the selected item.
BindingSource1.RemoveCurrent()
End Sub
End Class
Note that there's not actually a need for code like this:
vb.net Code:
If My.Settings.ComboBox1Items Is Nothing Then
' Required only for first run.
My.Settings.ComboBox1Items = New Specialized.StringCollection
End If
When you add a StringCollection to your settings, note that the Value field is empty by default. That's what causes the setting property to be Nothing by default. If you edit the Value and add an item, notice that the Value field is populated with an XML snippet, which actually creates a StringCollection object. If you then edit again and remove the item, the XML remains. That way, your setting property will contain an empty StringCollection object by default and you never have to test for Nothing.