You can use application settings behavior provided by the Framework and Visual Studio designer using the settings.settings file in the properties section of the project in the solution explorer.
You create a parameter of string type for example MyStringParameter
and you read and write access it like that:
Settings are automatically loaded at the program startup.
Somewhere to modify or read the value:
strValueYouNeed = Properties.Settings.Default.MyStringParameter;
// ...
Properties.Settings.Default.MyStringParameter = strValueYouWant;
Somewhere just after the parameter modified or at the program end or form closed event:
Properties.Settings.Default.Save();
Or you can use a hand-made application settings file where you can put what you want by code as well as control the folder location:
How to create a hand-made application settings file
How to initialize user app data and document path
You can also use a simple text file to store a collection.
If it is a string list you simply write:
var list = new List<string>();
// ...
File.WriteAllLines(strPath, list.ToArray());
WriteAllLines
takes in fact a string[]
as second argument.
To read it, you write:
var list = File.ReadAllLines(strPath)/*.ToList()*/;