2014-07-08 47 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