Read Text File into array w/ ce 5.0 Application

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • RW

    #1

    Read Text File into array w/ ce 5.0 Application

    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(lin enum)
    linenum = linenum + 1
    Loop

  • =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=

    #2
    RE: Read Text File into array w/ ce 5.0 Application

    I use this:

    dim strfileline as string()
    strfileline = File.ReadAllLin es("myfile.txt" )

    "RW" wrote:
    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(lin enum)
    linenum = linenum + 1
    Loop
    >
    >

    Comment

    Working...