By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,806 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,806 IT Pros & Developers. It's quick & easy.

File.ReadAllLines() doesn't read all lines

P: 8
Hi!
I've a weird problem using ReadAllLines Function.
I have a plain text file which has about 6500 lines, each one representing a 3D point. I read the text file and store it in a string array using ReadAllLines(). The thing is that the first time I call the function it only reads about 512 lines and stores them in the array. Second time it reads only 250, next time about 120 and so on. I do nothing with the text file beetween each read. Even if I start debugging, stop debugging just after the ReadAllLines call, and start debugging again, the second time it reads only half the lines it reads during the first debug. What am I missing???
Many thanks.
Mar 29 '07 #1
Share this Question
Share on Google+
1 Reply


vijaydiwakar
100+
P: 579
Hi!
I've a weird problem using ReadAllLines Function.
I have a plain text file which has about 6500 lines, each one representing a 3D point. I read the text file and store it in a string array using ReadAllLines(). The thing is that the first time I call the function it only reads about 512 lines and stores them in the array. Second time it reads only 250, next time about 120 and so on. I do nothing with the text file beetween each read. Even if I start debugging, stop debugging just after the ReadAllLines call, and start debugging again, the second time it reads only half the lines it reads during the first debug. What am I missing???
Many thanks.
sho ur code
Mar 29 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.