title: Implementing a Async/Await method returning a task in cli/c++?
body: <p>I am trying to implement a interface from a c# class in cli/cpp managed code.</p>
  
  <p>the interface look likes this:</p>
  
  <pre><code>public interface IManagedAlgorithmHost&lt;TOptions,TResult&gt; : IManagedAlgorithmHost
  {
      Task&lt;TResult&gt; RunAlgorithmAsync();
      void SetAlgorithmContext(IManagedAlgorithmContext&lt;TOptions&gt; context);  
  }
  </code></pre>
  
  <p>i figured out how to import the dll and that into my cli/cpp project, but I fail at figuring out if its even posible to create a class in managed c++ that implements that RunAlgorithmAsync method.</p>
  
  <pre><code>public ref class MyAlgHost
  {
  }
  </code></pre>
  
  <p>how do I extend the above c++/managed class with the interface and how do I create the method that returns Task</p>