I am currently writing a small application in Windows Mobile using CF.NET.
The application is very similar in its behaviour to an e-mail application i.e. I am using POP3 to download messages and attachments from my mail-server account to store on the storage-card for further processing with a MIME-tool.
My problem is downloading large attachments because at a certain point I get an OutOfMemory-exception. I found out some interesting things about this by reading the following question and answers published here on SO the other day. Since my attachments can amount to 4-5MB (mp3-songs), I realize that I have serious problems. However, at the same time Pocket Outlook is able to download mp3-songs up to 4-5MB without any problems (using a WIFI-connection) so there must be a way to do it!
At the moment, I am saving the download-buffer (converted into string) into a simple string-variable. I tried adding the content of the buffer into a stringbuilder but I still get OutOfMemory-exceptions.
What strategy/technique could I adapt to overcome this problem?