我WebClient用来获取Windows Phone 8和Android HttpClient的Yahoo数据我可以使用WebClient
WebClient client = new WebClient();
client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
client.DownloadStringAsync(url);
Run Code Online (Sandbox Code Playgroud)
发送事件后;
StringReader stream = new StringReader(e.Result)
XmlReader reader = XmlReader.Create(stream);
reader.ReadToFollowing("yweather:atmosphere");
string humidty = reader.MoveToAttribute("humidity");
Run Code Online (Sandbox Code Playgroud)
但是在Windows 8 RT中没有这样的东西.
我该如何获取以下数据?> http://weather.yahooapis.com/forecastrss?w=2343732&u=c
foreach (var netInterface in NetworkInterface.GetAllNetworkInterfaces())
{
if (netInterface.NetworkInterfaceType == NetworkInterfaceType.Wireless80211)
{
var address = netInterface.GetPhysicalAddress();
string c= BitConverter.ToString(address.GetAddressBytes());
}
}
Run Code Online (Sandbox Code Playgroud)
我的iPad显示像020000000输出,但我的模拟器显示正确,有问题吗?
如果我读了这个QRCode,使用ZXING条形码组件我得到这个VCARD:
1:
BEGIN:VCARD
VERSION:3.0
N:haluk
ORG:test
TITLE:12345
TEL:55533344121
END:VCARD
Run Code Online (Sandbox Code Playgroud)
我只需要N和ORG值,是否可以解析它?
我正在使用好友 sdk
此示例告诉我如何添加个人资料图片,我尝试了各种方法,但是当我尝试使用此代码时
client.CreateUserAsync("username","password").ContinueWith(r => { var user = r.Result;
// upload a profile photo
Stream photoStream = GetSomePhoto();
user.AddProfilePhotoAsync(photoStream);
});
Run Code Online (Sandbox Code Playgroud)
这是我的代码,但它给了我数组问题
var img = loginImagePicker.Image.AsPNG().AsStream();
var hu = await user.AddProfilePhotoAsync(img);
Run Code Online (Sandbox Code Playgroud)
这就是问题

有什么建议吗?