the file is a text file named shoeinfo.txt
it looks like this: BZB34,40.99
BZJ25,54.50
JMM97,14.99
JMM98,14.99
KNN12,35.99
LYR05,25.99
MMR56,7.99
PMN23,11.99
RTN21,7.99
RTZ11,8.99
my code so far is
Public Class Form1 Structure Product Public partnum As String Public price As Decimal End Structure Private Sub exitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles exitButton.Click Me.Close() End Sub Private Sub pricedispLabel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles pricedispLabel.Click Dim search As String Dim subscript As Integer search = partnumBox.Text End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim item(9) As Product Dim path As String = "C:\Documents and Settings\CoffeyA\My Documents\Visual Studio 2005\Projects\Chap09\shoeinfo.txt" Dim text As String text = My.Computer.FileSystem.ReadAllText(path)
unfortunately I am unable to figure out how the code is to be read into the array.
i.e. item(0).partnum = BZB34
item(0).price = 4099D
and so on. Please help.

New Topic/Question
Reply




MultiQuote





|