Saturday, 14 September 2013

Need help searching an array... very hard for me

Need help searching an array... very hard for me

Got a small problem. I don't know how to search one array so I can pull
that same array number from the other 2 arrays. I know how to test for a
lot of stuff so that won't be a problem.
The end result on this project is the user will place the amount they are
willing to pay for a make of the car and the page will display the data.
HOWEVER I don't know how to search the carArray() to find the index number
and use that index number to find the other stuff. I did find something
that did this (somewhat) earlier but I don't know how to modify it for me
to keep that index number as a int and use it to search and display the
other arrays.
I will need this in future projects later.
Public Class paymentPage
Private Sub car_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles car.TextChanged
End Sub
Private Sub price_TextChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles price.TextChanged
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim carArray() As String = {"Ford", "Chevy", "Mazda"}
Dim sellAmount() As Decimal = {32700, 35625, 24780}
Dim leaseAmount() As Decimal = {425, 505, 385}
End Sub
End Class

No comments:

Post a Comment