title: translation error in translating c# to vb .net using newton.jsoft (json.net) in visual studio 2012
body: <p>What is wrong with this code:
  error in translating c# to vb .net using newton.jsoft (json.net) in visual studio 2012:
  Original code:</p>
  
  <pre><code> public static List&lt;TradeInfo&gt; GetTrades(BtcePair pair)
      {
          string queryStr = string.Format("https://btc-e.com/api/2/{0}/trades", BtcePairHelper.ToString(pair));
          return JArray.Parse(WebApi.Query(queryStr)).OfType&lt;JObject&gt;().Select(TradeInfo.ReadFromJObject).ToList();
      }
  </code></pre>
  
  <p>Translated code:</p>
  
  <pre><code>Public Shared Function GetTrades(pair As BtcePair) As List(Of TradeInfo)
      Dim queryStr As String = String.Format("https://btc-e.com/api/2/{0}/trades", _
                                                  BtcePairHelper.ToString(pair))
      Return JArray.Parse(WebApi.Query(queryStr)).OfType(Of JObject)().[Select](TradeInfo.ReadFromJObject).ToList()
  End Function
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Error 1 Argument not specified for parameter 'o' of 'Public Shared Function ReadFromJObject(o As Newtonsoft.Json.Linq.JObject) As TradeInfo'.  </p>
  </blockquote>
  
  <p>Called function (vb):</p>
  
  <pre><code>Public Shared Function ReadFromJObject(o As JObject) As TradeInfo
      If o Is Nothing Then
          Return Nothing
      End If
  
   Return New TradeInfo() With 
    {.Amount = o.Value(Of Decimal)("amount"), _
      .Price = o.Value(Of Decimal)("price"), _
      .[Date] = UnixTime.ConvertToDateTime(o.Value(Of Long)("date")), _
      .Item = BtceCurrencyHelper.FromString(o.Value(Of String)("item")), _
      .PriceCurrency = BtceCurrencyHelper.FromString(o.Value(Of String)
      ("price_currency")), _
      .Tid = o.Value(Of Long)("tid"), _
      .Type = TradeInfoTypeHelper.FromString(o.Value(Of String)("trade_type")) _
      }
  End Function
  </code></pre>