This is what I am trying to accomplish.
I need to store an API key and Username securely within a program with the ability to update it.
I have dabbled in C# years ago and am fairly descent in VB.NET, PHP, VBScript and other scripting languages.
From what I have read I should use the App.config file rather than an INI file due to security. i have added the entries to my App.Config (see code below) and can read them just fine. My script will first check those values, if either are null then open a form to enter the information.
I cannot for the life of me find how to save that information back to the app.config or app.config.exe file.
I have googled for many of hours and found references to ConfigurationManager which apparently is not valid in C# Express. I only have ConfigurationSettings.
C# 2008 Express .Net 3.5
<?xml version="1.0" encoding="utf-8" ?>
<add key="apiKey" value="##############" />
<add key="apiUsername" value="APIUsername" />
string strApiKey = Convert.ToString(ConfigurationSettings.AppSettings["apiKey"]);