title: VB.NET passing function to Action parameter
body: <p>I am trying to write something in VB.NET based on a C# solution that I have. In the C# solution I call the function with:</p>
  
  <pre><code>somefunction(s =&gt; Console.WriteLine(s)).Wait();
  </code></pre>
  
  <p>And the called method is:</p>
  
  <pre><code>public static Task somefuntion(Action&lt;string&gt; callback);
  </code></pre>
  
  <p>In VB.NET I have</p>
  
  <pre><code>somefunction(Function(s) Console.WriteLine(s)).Wait()
  
  Public Shared somefunction(ByRef callback As Action(Of string)) As Task
  </code></pre>
  
  <p>Any ideas what I am doing wrong?</p>