title: How to get value returned from async Task<string> function(); in C#
body: <p>I have an async method and I want to get a message from the same method when it gets done.</p>
  
  <p><strong>Below is the code</strong></p>
  
  <pre><code> static async Task&lt;string&gt; pizza()
          {
              await Task.Delay(10);
              for (int i = 0; i &lt; 100; i++)
              {
                  //Console.WriteLine("Processing pizza...");
              }
              return "Pizza is ready";
  
          } 
  </code></pre>
  
  <p><strong>And I want to get receive this message at calling point</strong></p>
  
  <pre><code>....... code 
  Task t=null;
              switch (option)
              {
                  case 1:
                      {
  
                          await Task.Run(() =&gt;
                          {
  
                           t=pizza();// asynchronous method  
  
                          });
                          Console.WriteLine(t.ToString());
                      }
                      break;
   .... other code
  </code></pre>