title: Translate C# to VB.Net for a Salesforce REST call example
body: <p>I am trying to call a REST service on Salesforce.  I found a great example with C#, and I am attempting to translate it to VB.Net. So far I did well translating, but one line is giving me trouble.</p>
  <p>Please help with the translation of this line of code:</p>
  <pre><code>Task&lt;QueryResult&lt;dynamic&gt;&gt; results = client.QueryAsync&lt;dynamic&gt;(&quot;Select Id, FirstName, LastName from Contact&quot;);
  </code></pre>
  <p>Basically, the result of the REST call is returned using a dynamic keyword that is supposed to create the result type.  In VB.Net, when no type is provided, it should be the equivalent to a dynamic type in C#.</p>
  <p>I tried :</p>
  <pre><code> Dim o_results = o_client.QueryAsync(&quot;select Id, FirstName, LastName, email from contact&quot;)
  </code></pre>
  <p>But I get the error:</p>
  <p>BC32050 Type parameter 'T' for 'Public Overloads Function QueryAsync(Of T)(query As String) As Task(Of QueryResult(Of T))' cannot be inferred.</p>