title: How to read variables from text file in ArcMap Add-in application
body: <p>I have a little add-in application for ArcMap 10.6. The purpose of the app is to open a web map application in the same position where it was clicked on the ArcMap. The application works as aspected with the hardcoded parameters for the HTTP request. My question is how to do that user could define the parameters by himself? For instance to have some external text file where the user could define the parameters and my add-in could read it from there.
  I have tried to simply read the text file as follows:</p>
  <pre><code>string[] lines = System.IO.File.ReadAllLines(@&quot;C:\Temp\ArcMapConfig.txt&quot;);
  </code></pre>
  <p>however, I can't access the values of lines:</p>
  <pre><code>string username = lines[1];
  </code></pre>
  <p>I get the error &quot;A field initializer cannot reference the non-static field method or property&quot;.</p>
  <p>Thank you for your help.</p>