2014-07-08 71 views
0

我有問題將以下代碼轉換爲vb.net。 iam可以在wp8上直播sdk 5.6,我還可以使用其他一些可以與vb.net一起使用的示例嗎?Onedrive訪問和VB.Net

private async void GetMe() 
     { 
      try 
      { 
       LiveOperationResult operationResult = await this.liveClient.GetAsync("me"); 

       dynamic properties = operationResult.Result; 
       this.tbResponse.Text = properties.first_name + " " + properties.last_name; 
      } 
      catch (LiveConnectException e) 
      { 
       this.tbResponse.Text = e.ToString(); 
      } 
     } 

回答

0

我認爲這應該工作(使用telerik converter):

Private Sub GetMe() 
    Try 
     Dim operationResult As LiveOperationResult = Await Me.liveClient.GetAsync("me")  
     Dim properties As dynamic = operationResult.Result 
     Me.tbResponse.Text = properties.first_name + " " + properties.last_name 
    Catch e As LiveConnectException 
     Me.tbResponse.Text = e.ToString() 
    End Try 
End Sub