|
-
Nov 26th, 2007, 07:03 PM
#1
Thread Starter
Frenzied Member
how much memory can streamreader.ReadToEnd() hold
I have 2GB ram, and I checked that the taskmanager and I have more than enough memory left. I tried to ReadToEnd() a file that has 194 mb. Yet as soon as it passes the code, the returned string is a null. The file exists, and I tried other files(which are smaller) and it works. The code is as follows:
System.IO.StreamReader sr = new System.IO.StreamReader(@"c:\file1.csv");
string str = sr.ReadToEnd();
Why is it giving me out of memory exception?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|