fork download
  1. Uri uri = new Uri("http://w...content-available-to-author-only...o.jp/intl/ja_jp/images/logo.gif");
  2.  
  3. using (WebClient web = new WebClient())
  4. using (BufferedStream imgData = new BufferedStream(web.OpenRead(uri)))
  5. using (MemoryStream memory = new MemoryStream())
  6. {
  7. int data = -1;
  8. while ((data = imgData.ReadByte()) != -1)
  9. {
  10. memory.WriteByte((byte)data);
  11. }
  12. memory.Seek(0, SeekOrigin.Begin);
  13.  
  14. BitmapImage bi = new BitmapImage();
  15. bi.BeginInit();
  16. bi.StreamSource = memory;
  17. bi.EndInit();
  18.  
  19. bi.Freeze();
  20.  
  21. image.Source = bi;
  22. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty