I need to download a huge PDF file from an URL in my MonoTouch iPhone/iPad newsstand app.

The PDF is too big to fit in memory, so I need to save it incrementally with NSData.

My idea is the following: instead of appending all the downloaded data in NSData and at the very end of the download, when I got all data, to store it to a file, I want to execute the download asynchronously in a separate thread and append to a file each received chunk and free my memory, but be certain that if the connection is dropped or the app crashes the download would resume automatically from the last chunk without corrupting the file.

What do you suggest? Is there a better method? How can I do it in MonoTouch? I did't find any documentation or code example about iOS incremental download/resume on the Xamarin website.


Question: Exception when Importing .csv file from CLI
Answer: When you open a CSV file in Excel and click on save, the "Yes" will save the file as CSV again and "No" will prompt you to save the file as XLSX. Excel does save on this "Yes" even though closing the file will prompt you to save again.

Therefore, based on your description, you did save the CSV with Excel, and that will change the formatting of the file contents.

Start over and open your original file with Excel and choose SaveAs to save the file as CSV with a new name.

Use an editor like notepad++, not notepad, and open both files.
You will likely see formatting differences between the files like missing double quotes, changed line terminations, etc.
Based on what you find, you can change the formatting on the initial file and it will probably work.

If formatting isn't the problem, you may need to look for other issues like extra double quotes inside quoted text fields, for one example.