Click here to Skip to main content
15,920,111 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to Set Cell Backcolor of dataGridView Pin
Arun.Immanuel10-May-07 1:30
Arun.Immanuel10-May-07 1:30 
Questioncombo box Pin
balanjingot9-May-07 22:02
balanjingot9-May-07 22:02 
AnswerRe: combo box Pin
Arun.Immanuel9-May-07 22:20
Arun.Immanuel9-May-07 22:20 
GeneralRe: combo box Pin
balanjingot9-May-07 22:27
balanjingot9-May-07 22:27 
QuestionHow to send message to certain process? Pin
Smart Markey9-May-07 21:56
Smart Markey9-May-07 21:56 
AnswerRe: How to send message to certain process? Pin
Luc Pattyn9-May-07 23:25
sitebuilderLuc Pattyn9-May-07 23:25 
QuestionSystem.OutOfMemoryExeception Pin
Stoyan Furnadzhiev9-May-07 21:50
Stoyan Furnadzhiev9-May-07 21:50 
AnswerRe: System.OutOfMemoryExeception Pin
Martin#9-May-07 23:10
Martin#9-May-07 23:10 
Hello,

Is the Exception accuring on the first time you are reading the file, or are you entering this code more often?

Just for info:
You should use the "new StreamReader" in a using block.
using(StreamReader reader = new StreamReader(filePath))
{
...
...
}//This makes sure that the Close() and/or the Dispose() method is called of the instance. (Can also have the effect of your Exception)

Using a StringBuilder is correct, so why doing this:
sequence.Append(line + "\n");
Instead of:
sequence.Append(line);
sequence.Append("\n"); //By the way, look at "Enviroment.NewLine"

Hope it helps!

All the best,

Martin


AnswerRe: System.OutOfMemoryExeception Pin
Luc Pattyn9-May-07 23:21
sitebuilderLuc Pattyn9-May-07 23:21 
Questionplz Help Pin
IrfanHaleem9-May-07 21:48
IrfanHaleem9-May-07 21:48 
AnswerRe: plz Help Pin
Rajesh R Subramanian9-May-07 21:56
professionalRajesh R Subramanian9-May-07 21:56 
AnswerRe: plz Help Pin
Vikram A Punathambekar9-May-07 22:14
Vikram A Punathambekar9-May-07 22:14 
QuestionXML Parsing C# Pin
satsumatable9-May-07 21:46
satsumatable9-May-07 21:46 
AnswerRe: XML Parsing C# Pin
DavidNohejl9-May-07 22:07
DavidNohejl9-May-07 22:07 
QuestionSelectAll - not working on a maskededitbox [modified] Pin
tcss9-May-07 21:35
tcss9-May-07 21:35 
AnswerRe: SelectAll - not working on a maskededitbox Pin
tcss10-May-07 0:44
tcss10-May-07 0:44 
QuestionNEED HELP c# remoting need remotable class to use server's class's function Pin
neodeaths9-May-07 21:26
neodeaths9-May-07 21:26 
QuestionHow to restart the program after a function? Pin
Missy Glory9-May-07 21:12
Missy Glory9-May-07 21:12 
AnswerRe: How to restart the program after a function? Pin
Martin#9-May-07 21:20
Martin#9-May-07 21:20 
GeneralRe: How to restart the program after a function? Pin
Missy Glory9-May-07 21:33
Missy Glory9-May-07 21:33 
GeneralRe: How to restart the program after a function? Pin
Martin#9-May-07 21:38
Martin#9-May-07 21:38 
AnswerRe: How to restart the program after a function? Pin
Leyu10-May-07 2:15
Leyu10-May-07 2:15 
QuestionCalling Form Twice Pin
gvanto9-May-07 20:31
gvanto9-May-07 20:31 
AnswerRe: Calling Form Twice Pin
sam#9-May-07 20:52
sam#9-May-07 20:52 
GeneralRe: Calling Form Twice Pin
gvanto9-May-07 21:24
gvanto9-May-07 21:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.