TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dennis Miller
NA
9
0
Out of Memory reading large byte array
Sep 30 2009 7:59 AM
I'm fairly new to C# and am perplexed. Executing the following against a file of 641,763,107 bytes, I get an out-of-memory exception. FileStream dFile = new FileStream(iFile, FileMode.Open, FileAccess.Read); BinaryReader binReader = new BinaryReader(dFile); int iLgth = (int)dFile.Length; byte[] dBytes = new byte[iLgth]; dBytes = binReader.ReadBytes(iLgth); binReader.Close(); dFile = null; At the time of execution, the system has 1 1/2gig of memory available. Can anyone help me or explain this error? Dennis
Reply
Answers (
3
)
Is there any Browse control in c# window application?
SPORT LEAGUE TABLE DESIGN IN VB.NET