Importing Data Into An Array In Visual Basic (1 Viewer)

Beege

Member
Joined
Oct 14, 2006
Messages
771
Gender
Male
HSC
2007
Are there any sites that show you how to import data from a text file into an array in visual basic using either a linear or binary search. A template would be even better!

appreciate it
 

ianc

physics is phun!
Joined
Nov 7, 2005
Messages
618
Location
on the train commuting to/from UNSW...
Gender
Male
HSC
2006
this is basically the method i used at school.......you need a CSV file, and it will read all the data into a 2D array.

http://www.vb-helper.com/howto_csv_to_array.html

You can combine a linear seach into this sequential input from a file, but it is easiest to read all the data into an array and then work with the array after that, doing whatever sort/search operations you like.


Hope this helps - feel free to ask anything else!!
 

Beege

Member
Joined
Oct 14, 2006
Messages
771
Gender
Male
HSC
2007
Can it automatically import the data into the array without using the button?

Plus is there any linear/binary search and bubble/selection/insertion sort code available?
 

sunny

meh.
Joined
Jul 7, 2002
Messages
5,350
Gender
Male
HSC
2002
Beege said:
Can it automatically import the data into the array without using the button?
You can look at the code that runs when you click the button.

Beege said:
Plus is there any linear/binary search and bubble/selection/insertion sort code available?
The first thing to try would be to take the algorithms from your textbook and have a go at converting it to code yourself.
 

Beege

Member
Joined
Oct 14, 2006
Messages
771
Gender
Male
HSC
2007
k I will as visual basic is similar to pseudocode
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top