A program's settings can have many data types such as int, char, DateTime, and Color. If you want to be able to hold a list of strings, you can make a setting that has type StringCollection.
To create such a setting, open the Project menu and select Properties at the bottom to see the following Properties page, and click the Settings tab.
Enter the name you want to give the property in the left text box. Select the data type System.Collections.Specialized.StringCollection in the left dropdown. Use the right dropdown to set the setting's scope to User (not shared) or Application (shared by all users).
If you run the program at this point, the setting isn't actually created so if you try to add or remove an item from the collection you'll get the error "Object reference not set to an instance of an object."
There are a couple of ways you can fix this. First, you can create the setting object at run time if it is null, but this is a bit of a hassle.
A better solution is to click the Value text box on the Settings page. Then click the ellipsis to the right to open a String Collection Editor. If you close this without adding any strings, the Settings window still doesn't actually create the setting object. To prevent that, add a string to the String Collection Editor and click OK. Then open the editor again, remove the string, and click OK. This keeps the setting object but it's empty. If you look closely at the value shown in the Settings page, you'll see:
|