Skip to content

Instantly share code, notes, and snippets.

@JonRurka
Created December 30, 2014 04:13
Show Gist options
  • Save JonRurka/bcdee4d0e530950c7728 to your computer and use it in GitHub Desktop.
Save JonRurka/bcdee4d0e530950c7728 to your computer and use it in GitHub Desktop.
MemoryStream stream = new MemoryStream();
WebClient client = new WebClient();
byte[] bytes = client.DownloadData("http://nug700.github.io");
stream.Write(bytes, 0, bytes.Length);
Console.WriteLine(Encoding.ASCII.GetString(stream.ToArray()));
HtmlDocument doc = new HtmlDocument();
doc.Load(stream, Encoding.ASCII);
doc.Save("test.html"); // nothing written to file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment