title: Execute code after return
body: <p>On my web API, I want to delete a folder after my return statement.</p>
  
  <pre><code>public string Post(HttpRequestMessage request)
  {
      //Do cool stuff with request
      try
      {
          return "10.0.2.2:8080/myFolder/index.html";
      }
      finally
      {
          Thread.Sleep(60000);
          Directory.Delete(myFolder, true);
      }
  }
  </code></pre>
  
  <p>What I expected is that the device making the <code>POST</code> could get the return statement and load the <code>html</code> file. After a minute, we delete this file to free space on the server.</p>
  
  <p>What happens is that the return statement is actually sent after the finally statement.</p>
  
  <p>How can I run code after a return statement with delay, without delaying the return?</p>