Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

How to use WebClient in Xamarin.Forms

$
0
0

Hi, I'm trying to download a file in an iOS Xamarin.Forms application

I've include the code

var webClient = new WebClient ();
webClient.DownloadProgressChanged += (sender, e) => {
Console.WriteLine("Download... {0}%, {1}", e.ProgressPercentage, AppUtility.humanReadableFileSize(e.BytesReceived));
};

But I'm getting the error error CS0246: The type or namespace name `WebClient' could not be found. Are you missing an assembly reference?
I've included

using System.Net;
using System.IO;
using System.Text;

As shown in the recipe below

http://developer.xamarin.com/recipes/ios/network/web_requests/download_a_file/

How do I solve this?


Viewing all articles
Browse latest Browse all 58056

Trending Articles