none
VB.net 2010如何把从外部API服务器获取的数组的放入一个数组变量。 RRS feed

  • 问题

  • Dim api As StreamsterApi = New StreamsterApi

    Dim ap As Position()
    Dim p As Position

    ap = api.GetPositions()

    For Each p In ap
        Console.WriteLine("")
        Console.WriteLine("Position:")

        Console.WriteLine("PositionID: " & p.PositionID)
        Console.WriteLine("Desk: " & p.Desk)
        Console.WriteLine("Instrument: " & p.Instrument)
        Console.WriteLine("Side: " & p.Side)
        Console.WriteLine("OpenPrice: " & p.OpenPrice)
        Console.WriteLine("Currency: " & p.Currency)
        Console.WriteLine("Quantity: " & p.Quantity)
        Console.WriteLine("Points: " & p.Points)
        Console.WriteLine("Profit: " & p.Profit)
        Console.WriteLine("ExitStopLoss: " & p.ExitStopLoss)
        Console.WriteLine("ExitTarget: " & p.ExitTarget)
        Console.WriteLine("Entered: " & p.Entered)
        Console.WriteLine("Exited: " & p.Exited)
        Console.WriteLine("Status: " & p.Status)
        Console.WriteLine("Text: " & p.Text)
        Console.WriteLine("ClosePrice: " & p.ClosePrice)
        Console.WriteLine("Interest: " & p.Interest)
    Next

    怎么把数组中的 多个p.PositionID  放入一个变量

    2011年8月15日 0:33

答案