Read Text File into array w/ ce 5.0 Application

  • Thread starter Thread starter RW
  • Start date Start date
R

RW

Hello. I've been working w/ vb 6.0 for sometime now and have moved up
to VS 2005 to create a application for a Windows CE 5.0 hand held
device. I thought the transition would be easy, however the language
is quite a bit different from vb6. So here's a snippet of code that I
would use in vb6 to read a text file line by line into an array.
Could someone point me in the right direction on how to do this in
Vb2005 for a Ce App? Thanks, RW

dim linenum as double
dim strfileline(1 to 500) as string

Open "myfile.txt" For Input As #iFileNr

linenum = 1

Do until eof(iFileNr)
Line Input #iFileNr, strfileline(linenum)
linenum = linenum + 1
Loop
 
Back
Top