title: why does the application stops working when trying to get files from a folder?
body: <p>The problem is that my application is something like &quot;hanging&quot; when it calls GetFilesAsync. In the code below, the folder was obtained using FolderPicker. And during debugging I can't reach foreach loop. What can I do?</p>
  <pre><code>public async void LoadFiles(AutoResetEvent waitForLoadComplete = null)
          {
              var files = await Folder.GetFilesAsync();
              foreach (var item in files)
              {
                  //some stuff
              }
          }
  </code></pre>
  <p>The problem was solved by removing AutoResetEvent.WaitOne() frob the code below:</p>
  <pre><code>               AutoResetEvent waitForLoadComplete = new AutoResetEvent(false);
                 LoadFiles(waitForLoadComplete);
                 waitForLoadComplete.WaitOne();
  </code></pre>