title: Why can't use Task<>.Result property?
body: <p>I have a problem with my tasks. When I try to recive returned variable from my task I can't use a .Result property to get it. Here is my code:</p>
  
  <pre><code>var nextElement = dir.GetValue(i++).ToString();
  Task buffering = Task&lt;byte[]&gt;.Run(() =&gt; imageHashing(nextElement));
  bitmapBuffer = buffering.Result;
  </code></pre>
  
  <p>and imageHasing function is declared like this:<code>public bool[] imageHashing(string path)</code></p>
  
  <p>I get an error saing: </p>
  
  <blockquote>
    <p>Severity  Code    Description Project File    Line    Suppression State
    Error CS1061  'Task' does not contain a definition for 'Result' and no
    extension method 'Result' accepting a first argument of type 'Task'
    could be found (are you missing a using directive or an assembly
    reference?)</p>
  </blockquote>
  
  <p>Example from <a href="https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1.result?view=netframework-4.7" rel="nofollow noreferrer">this microsoft website</a> works, and I can't understand why.</p>