473,397 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Read Text File into array w/ ce 5.0 Application

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

Sep 10 '07 #1
1 2544
I use this:

dim strfileline as string()
strfileline = File.ReadAllLines("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(linenum)
linenum = linenum + 1
Loop

Sep 11 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: ranjeet | last post by:
Hay Guys can you all suggest me the points on the below issue Problem : The thing is that I have the data some thing like this. 1486, 2168, 3751, 9074, 12134, 13944, 17983, 19173, 21190,...
7
by: Naren | last post by:
Hello All, Can any one help me in this file read problem. #include <stdio.h> int main() {
1
by: tim | last post by:
I have a multi-dimensional byte array, private someArray(,,) as byte and it's huge redim someArray(100,640,480,3) after populating the array, I write it to a text file to save it. (so I don't...
1
by: Genevieve | last post by:
I have this text file below saved in my c: directory FeedA:100:200:400:233:564:10:237200:400:233 FeedB:267:126:548:128:675:16:293:567:89 FeedC:162:654:876:918:727:81:891:75:554...
9
by: Adi | last post by:
Hello eveyone, I wanna ask a very simple question here (as it was quite disturbing me for a long time.) My problem is to read a file line by line. I've tried following implementations but still...
2
by: RyanS09 | last post by:
Hi- I have read many posts with specific applications of reading in text files into arrays, however I have not been able to successfully modify any for my application. I want to take a text file...
6
by: portCo | last post by:
Hello there, I am creating a vb application which is some like like a questionare. Application read a text file which contains many questions and display one question and the input is needed...
13
by: rohit | last post by:
Hi All, I am new to C language.I want to read integers from a text file and want to do some operation in the main program.To be more specific I need to multiply each of these integers with another...
5
by: dm3281 | last post by:
Hello, I have a text report from a mainframe that I need to parse. The report has about a 2580 byte header that contains binary information (garbage for the most part); although there are a...
3
by: sam | last post by:
same as subject?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.