using System;
using System.Net;
using System.IO;
public class MainClass
{
public static void Main()
{
String ticker = "MSFT";
WebRequest req = WebRequest.Create("http://finance.yahoo.com/d/quotes.csv?s="+ticker+"&f=sl1d1t1c1ohgv&e=.csv");
StreamReader inp = new StreamReader(req.GetResponse().GetResponseStream());
String line;
while ((line = inp.ReadLine())!=null)
{
Console.WriteLine(line);
}
inp.Close();
}
}
|