【发布时间】:2014-07-20 15:22:10
【问题描述】:
我有一个这样的 WebClient:
private void Button_Click(object sender, RoutedEventArgs e)
{
WebClient wc = new WebClient();
wc.DownloadStringAsync(new Uri(myurl));
wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadStringCompleted);
}
处理程序:
private void wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
MessageBox.Show(e.Result.ToString());
}
这就是我得到的:
{"out_error":"",
"out_id":4274,
"out_device_hash":"7a8e4f7a264a6afb38cfadb6b50e7a45c58d226b",
"out_device_name":"Unnamed device",
"out_uname":"User Name",
"token":"e1c063d16fee7bb8912099034f67c2d17a8f45c3"}
问题是我怎样才能将这些字符串排序为像 xml 中的分隔字符串:
string error = out_error;
string id = out_id;
等等...谢谢。
【问题讨论】:
标签: c# json windows-phone-8 webclient