2012-03-12 21 views
1

私はWindowsの携帯電話7VB.NET WebクライアントのWindows Phone 7

ためvb.netのWebクライアントを使用して、ページのソースコードを入手することができますどのように知っていただきたいと思い、私はC#の例を見つけましたが、私はvb.net例が必要。

ありがとうございます!

C#(私はインターネット上で見つけたコード)

public void GetFeed() 

{ 

    WebClient client = new WebClient(); 

    client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted); 

    client.DownloadStringAsync(new Uri("http://www.slpg.org/syndication.axd")); 

} 



void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) 

{ 

    string data = e.Result; 

    // do something with the feed here 

} 

VB.Net(VBウェブサイトの出力のC#)

Public Sub GetFeed() 


    Dim client As New WebClient() 

    client.DownloadStringCompleted += New DownloadStringCompletedEventHandler(AddressOf client_DownloadStringCompleted) 

    client.DownloadStringAsync(New Uri("http://www.slpg.org/syndication.axd")) 

End Sub 



Private Sub client_DownloadStringCompleted(sender As Object, e As DownloadStringCompletedEventArgs) 


    Dim data As String = e.Result 

    ' do something with the feed here 

End Sub 

答えて

0

のC#-to-VB変換してC#の例を実行してみてください例えばCode Translatorのようなユーティリティ。

あなたが見つけたサンプルを投稿することをお勧めします。おそらく誰かがあなたのためにそれを翻訳してくれます。

+0

あなたが送ったこのウェブサイトは本当にうまくいっています!ありがとう! –

関連する問題