String length problem
I'm using VB.NET 2005 Express, and I am reading in the contents of a text file.
I have declared:
Dim strLine as String
I'm using the StreamReader to read the contents of the text file, and I'm putting the contents into strLine.
Unfortunately, it only seems to read in the first 16381 lines from the text file, and processes those lines without any problems - but ignores lines beyond this. All my other test files (having far fewer lines than 16381) work fine.
On this occasion, the file that I need to read is 124415 lines long and so, as a novice, I've concluded that 'String' isn't up to the job.
Can anybody point me in the right direction?
Please post the code you're using to read the file.
Thanks for your reply.
I managed to solve the problem.
I had a Try ... Catch which was hiding the real problem - which was a problem with huge numbers I hadn't anticipated having to process. Simply changing the variables from Int to Long seems to have solved the problem.