Question

I am trying to download a data file to my application the file can be viewed here:

http://www.net-flyer.net/DataFeed/vatsim-data.txt

here is my code:

string address = "http://www.net-flyer.net/DataFeed/vatsim-data.txt";
string filename = "vsd.txt";
WebClient client = new WebClient();
client.DownloadFile(address,filename);

It downloads the file like I want, but there are no line breaks in the downloadedfile, it is just one continous line of text. Does anyone know what I'm doing wrong?

Was it helpful?

Solution

Actually your downloaded file uses 0x0A characters as line breaks. It looks nice on your web browser but seems to be missed when you open your downloaded file on notepad. Try open it on another editor, like Visual Studio.

If you open that downloaded file within an hex editor, you'll see they're equal.

OTHER TIPS

Use Notepad++ or something similar. I use UltraEdit

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top