title: How to correctly read values from a Text File
body: <p>I am working on a project where values are stored in a Text file and should be retrieved every time the application starts.
  The text file is very simple and straight forward:</p>
  
  <pre><code>{
      "HowManyDayImages": "11",
      "HowManyNightImages": "5",
  }
  </code></pre>
  
  <p>I have this simple class with two values as numbers:</p>
  
  <pre><code>public class ImageConfig
  {
      public int HowManyDayImages { get; set; }
      public int HowManyNightImages { get; set; }
  }
  </code></pre>
  
  <p>then I have this code to look up the respected file and read the values from it and set them:</p>
  
  <pre><code>public static async void LoadConfigAsync()
  {
      try
      {
          ApplicationDataContainer settings = ApplicationData.Current.LocalSettings;
          string themeName = (string)settings.Values["Theme"];
          StorageFolder localFolder = ApplicationData.Current.LocalFolder;
          StorageFolder timeFolder = await localFolder.GetFolderAsync("Dynamic");
          StorageFolder themeFolder = await localFolder.GetFolderAsync(themeName);
          string imageConf;
          if (File.Exists("images.conf"))
          {
              imageConf = File.ReadAllText("images.conf");
          }
          else
          {
              imageConf = Encoding.UTF8.GetString(Properties.Resources.imageConf);
          }
          imageSettings = JsonConvert.DeserializeObject&lt;ImageConfig&gt;(imageConf);
      }
      catch
      {
      }
  }
  </code></pre>
  
  <p>with this I am facing two problems. the first is that in this line " Encoding.UTF8.GetString(Properties.Resources.imageConf);" I am getting the error that "Properties" does not exist in the current context.</p>
  
  <p><a href="https://i.stack.imgur.com/9Ynn3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9Ynn3.png" alt="The Dynamic folder inside the project"></a></p>
  
  <p>The second problem I am facing is that I keep getting an error saying that "Dynamic" could not be found.</p>