What you want (or seems to be) is not such a trivial thing to do right, and passes away from the code posted. I'll put a code that makes the basics practically mounted on top of the documentation examples but this code is not in a position to go to production.
using System.Console;
using System.Net;
using System.IO;
using System.Collections.Generic;
public class Program {
public static void Main() {
var paginas = BaixarTudo(new List<string>{"http://google.com", "http://yahoo.com"});
foreach(var pagina in paginas) {
WriteLine(pagina);
}
}
public static List<string> BaixarTudo(List<string> urls) {
var paginas = new List<string>(urls.Count);
foreach(var url in urls) {
var client = new WebClient();
client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
using (var data = client.OpenRead(url)) {
using (var reader = new StreamReader(data)) {
paginas.Add(reader.ReadToEnd());
}
}
}
return paginas;
}
}
See running on dotNetFiddle .