I\'m new with C#. I\'ve written code to open a CSV file from my documents on my local machine. It works well and the data parsing works. Trouble is when I change the code to ope
Your code as pasted would not compile. You can however use the WebClient
to download to a string, then split the string into lines:
string content;
using(WebClient wc = new WebClient())
content = wc.DownloadString("http://www.datasource.com/apps/qt/csv/pricehistory.ac?section=yearly_price_download&code=XXX");
foreach(var line in content.Split(new string [] {Environment.NewLine}, StringSplitOptions.None))
{
//...
}