title: Read file right after it was created and closed
body: <p>After creating a file via File.Create, I want to read it afterwards with File.ReadAllText. However, I always get an exception that says that the process cannot access the file. Once the file is created, access works without problems.
  So I assume that the file is not yet released by File.Create at the time where it should be read. How do I solve this? Below is my method.</p>
  <pre><code>    public SettingsModel LoadSettings()
      {
          var _fullPath = FileHelper.GetFullPath(_fileName);
          if (!File.Exists(_fullPath))
          {
              File.Create(_fullPath).Close();
          }
          var serializedSettings = File.ReadAllText(_fullPath);
          var settings = JsonConvert.DeserializeObject&lt;SettingsModel&gt;(serializedSettings);
  
          if (settings == null)
          {
              return new SettingsModel();
          }
          else
          {
              return settings;
          }
      }
  </code></pre>