I am not sure why. >_>
Structure is as follows:
public structure Item
dim itemName as String
dim itemCost as double
end structure
Dim counter As Integer
counter = 0
Dim ItemStruc As Item()
Do While (counter < fileLength)
txtRandom.Text = txtRandom.Text + Line.ToString
'Dim Line As String = s(counter)
Try
Dim Contents As String() = Line.Split("-")
'Splitting items in Inventory List into an array
ItemStruc(counter).ItemName = Contents(0)
ItemStruc(counter).ItemCost = Contents(1)
Dim strNewItem As String
strNewItem = FormatCurrency(ItemStruc(counter).ItemCost) & " - [" & ItemStruc(counter).ItemName & "]"
lstInventory.Items.Add(strNewItem)
counter = counter + 1
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

New Topic/Question
Reply



MultiQuote



|