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
vishnuvarthan v
NA
151
0
Reg: Loading text file(size 100 MB) in Richtextbox
May 8 2012 6:56 AM
Hi,
I am trying to load 100 MB of Text file in rich text box, but the application gets hang or some times it gives out of memory exception.
I tried below
Case1: it is running for long time
fs = new FileStream(FileName, FileMode.OpenOrCreate, FileAccess.ReadWrite);
sr = new StreamReader(fs);
//rtxtFile.AppendText( sr.ReadToEnd());
while (!sr.EndOfStream)
{
rtxtFile.AppendText(sr.ReadLine() + System.Environment.NewLine);
}
Case2: out of memory exception
fs = new FileStream(FileName, FileMode.OpenOrCreate, FileAccess.ReadWrite);
sr = new StreamReader(fs);
rtxtFile.AppendText( sr.ReadToEnd());
anybody give the solution for the above problem;
with reagrds,
Vishnuvarthan.V
Reply
Answers (
4
)
Videos of statemanagement,localisation and globilisation,data connection concepts in .NET
Quantity property