C# 在Windows Phone 8中使用后停止WebClient

C# 在Windows Phone 8中使用后停止WebClient,c#,.net,windows-phone-8,C#,.net,Windows Phone 8,我想在使用WebClient后停止,但找不到方法 public static WebClient webClient = new WebClient(); 您可以使用: 例如: var client = new WebClient(); string url = "http://example.com/parameter"; client.BeginDownloadString(uri); client.CancelAsync(); 您只是创建了WebClient对象,没有在给定的代码中启动

我想在使用WebClient后停止,但找不到方法

public static WebClient webClient = new WebClient();
您可以使用:

例如:

var client = new WebClient();
string url = "http://example.com/parameter";
client.BeginDownloadString(uri);
client.CancelAsync();

您只是创建了WebClient对象,没有在给定的代码中启动任何东西?我想您希望
处理
而不是
停止
,因为您在使用后说
是,我怎么做?它返回未经处理的错误我的代码是client.UploadStringCompleted+=webClientfollow\u UploadStringCompleted;client.Headers[“Content Type”]=“application/json;charset=utf-8”;client.UploadStringAsync(uri,“POST”,followinfo);//client.CancelAsync();为什么不使用async并等待?遵循以下示例:您有httpclient的工作示例吗?有什么不同