title: Why does my program freeze after a return ?
body: <p>I have this class : </p>
  
  <pre><code>public class ImgurAPI
  {
      private string ClientId = "id";
      private string ClientSecret = "secret";
      private string BasicUri = "https://api.imgur.com/3/";
      private HttpClient HttpClient = new HttpClient();
      public ImgurAPI()
      {
          HttpClient.DefaultRequestHeaders.Add("Authorization", "Client-ID " + ClientId);
      }
  
      private async Task&lt;HttpContent&gt; doRequest(string urlQuery)
      {
          HttpResponseMessage response = await HttpClient.GetAsync(urlQuery);
          return response.Content;
      }
      public HttpContent getImages(string search, int minSizeX, int minSizeY, string imageType, int page)
      {
          var url = BasicUri + "gallery/search/top/" + page.ToString() + "/";
          url += "?q=" + search;
          Task&lt;HttpContent&gt; task = doRequest(url);
          return task.Result;
      }
  }
  </code></pre>
  
  <p>That I call this way : </p>
  
  <pre><code>private void SearchImageClicked(object sender, RoutedEventArgs e)
  {
     HttpContent content = api.getImages(SearchBox.Text, 0, 0, "png", 1);
     // other code here
  }
  </code></pre>
  
  <p>But when <code>getImages</code> return, my program freeze. I put a breakpoint on             <code>return task.Result;</code> and it goes there. But I also put a breakpoint after the <code>getImages</code> call and it doesn't go there, my program freeze and I have to kill the process to make it stop.</p>
  
  <p>How it it possible ? </p>