 <p>If you want to save for example usersettings you could create <a href="https://msdn.microsoft.com/en-us/library/aa730869(v=vs.80).aspx" rel="nofollow">Settings </a>in your Properties.</p> <p>You can get them like this:</p> <pre><code>string anyProperty = WindowsFormsApplication1.Properties.Settings.Default.TestSetting; </code></pre> <p>You save them using the <code>Save</code>-method:</p> <pre><code>WindowsFormsApplication1.Properties.Settings.Default.TestSetting = "Hello World"; WindowsFormsApplication1.Properties.Settings.Default.Save(); </code></pre> <p>You can call the <code>Save</code>-method after you have clicked the close-button.</p> <p>For saving several string properties you could create a property of the type <code>System.Collections.Specialized.StringCollection</code>, so that you just create one property and not 21.</p>