Create StreamReader from a URL : StreamReader : File Directory Stream C# Examples


C# Examples » File Directory Stream » StreamReader »

 

Create StreamReader from a URL









    
using  System;
using  System.Collections.Generic;
using  System.Text;
using  System.Net;
using  System.IO;

class  MainClass
{
        static  void  Main(string[]  args)
        {
                StreamReader  reader  =  new  StreamReader(WebRequest.Create("http://www.navioo.com").GetResponse().GetResponseStream());
                string  line;
                while  ((line  =  reader.ReadLine())  !=  null)
                {
                        Console.WriteLine(line);
                }
        }
}
    
   
  
   



Output


     Java examples (example source code) Organized by topic 
...


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo File Directory Stream
» StreamReader