title: warning this call is not awaited, execution of the current method continues
body: <p>Just got VS2012 and trying to get a handle on <code>async</code>.</p>
  
  <p>Let's say I've got an method that fetches some value from a blocking source. I don't want caller of the method to block. I could write the method to take a callback which is invoked when the value arrives, but since I'm using C# 5, I decide to make the method async so callers don't have to deal with callbacks:</p>
  
  <pre><code>// contrived example (edited in response to Servy's comment)
  public static Task&lt;string&gt; PromptForStringAsync(string prompt)
  {
      return Task.Factory.StartNew(() =&gt; {
          Console.Write(prompt);
          return Console.ReadLine();
      });
  }
  </code></pre>
  
  <p>Here's an example method that calls it. If <code>PromptForStringAsync</code> wasn't async, this method would require nesting a callback within a callback. With async, I get to write my method in this very natural way:</p>
  
  <pre><code>public static async Task GetNameAsync()
  {
      string firstname = await PromptForStringAsync("Enter your first name: ");
      Console.WriteLine("Welcome {0}.", firstname);
  
      string lastname = await PromptForStringAsync("Enter your last name: ");
      Console.WriteLine("Name saved as '{0} {1}'.", firstname, lastname);
  }
  </code></pre>
  
  <p>So far so good. The problem is when I <em>call</em> GetNameAsync:</p>
  
  <pre><code>public static void DoStuff()
  {
      GetNameAsync();
      MainWorkOfApplicationIDontWantBlocked();
  }
  </code></pre>
  
  <p>The whole point of <code>GetNameAsync</code> is that it's asynchronous. I don't <em>want</em> it to block, because I want to get back to the MainWorkOfApplicationIDontWantBlocked ASAP and let GetNameAsync do its thing in the background. However, calling it this way gives me a compiler warning on the <code>GetNameAsync</code> line:</p>
  
  <pre><code>Warning 1   Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.
  </code></pre>
  
  <p>I'm perfectly aware that "execution of the current method continues before the call is completed". That's the <em>point</em> of asynchronous code, right?</p>
  
  <p>I prefer my code to compile without warnings, but there's nothing to "fix" here because the code is doing exactly what I intend it to do. I can get rid of the warning by storing the return value of <code>GetNameAsync</code>:</p>
  
  <pre><code>public static void DoStuff()
  {
      var result = GetNameAsync(); // supress warning
      MainWorkOfApplicationIDontWantBlocked();
  }
  </code></pre>
  
  <p>But now I have superfluous code. Visual Studio seems to understand that I was forced to write this unnecessary code, because it suppresses the normal "value never used" warning.</p>
  
  <p>I can also get rid of the warning by wrapping GetNameAsync in a method that's not async:</p>
  
  <pre><code>    public static Task GetNameWrapper()
      {
          return GetNameAsync();
      }
  </code></pre>
  
  <p>But that's even <em>more</em> superfluous code. So I have to write code I don't need or tolerate an unnecessary warning.</p>
  
  <p>Is there something about my use of async that's wrong here?</p>