title: Understanding the use of Task.Run + Wait() + async + await used in one line
body: <p>I'm a C# newbie, so I'm struggling to understand some concepts, and I run into a piece of code that I'm not quite understanding:</p>
  
  <pre><code>static void Main(string[] args)
  {
   Task.Run(async () =&gt; { await SomeClass.Initiate(new Configuration()); }).Wait();
   while (true) ;
  }
  </code></pre>
  
  <p>As I understand, this runs a task which initiates a method. This method runs, and then, once it finished, it gets into an infinite loop waiting. It feels that either the code doesn't make sense, or that I'm not understanding right.</p>
  
  <p>Thanks</p>