Is there a way to synchronously run a C# task and get the result in one line of code?
<p>I have an async method which works when I call it as follows:</p>

<pre><code>var result = await someClass.myAsyncMethod(someParameter);
</code></pre>

<p>Is it possible to do something like this, but in one line of code?</p>

<pre><code>var task = someClass.myAsyncMethod(someParameter);
task.RunSynchronously();
var result = task.Result;
</code></pre>