Question Searching Arrays

pinkladyxo

New member
Joined
Nov 21, 2009
Messages
1
Programming Experience
Beginner
Hi I am new to VB.NET and working with arrays. I need to create 4 parallel arrays which, when the user enters an ISBN number of a book then clicks the button, the arrays are searched and then use the ISBN number to locate the book name, publisher, and author. The code I have so far sets up the parallel arrays. The user needs to enter the 10 digit ISBN number corresponding to the certain book. So if the ISBN number "0-7821-4404-7" is entered and the button is clicked, "book1" "aut1" and "pub1" will show up in designated textboxes. Since a hyphen is sometimes entered as part of the ISBN number, I need to add a line of code that removes the hyphen so it is not read as part of the number.
This is all I have so far. Can someone guide me?

VB.NET:
Private Sub ButtonInfo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonInfo.Click
        Dim ISBN(4) As String
        ISBN(0) = "0-7821-4404-7"
        ISBN(1) = "0321316312"
        ISBN(2) = "0321348990"
        ISBN(3) = "0-471-43036-6"
       

        Dim title(4) As String
        title(0) = "book1"
        title(1) = "book2"
        title(2) = "book3"
        title(3) = "book4"
       

        Dim author(4) As String
        author(0) = "aut1"
        author(1) = "aut2"
        author(2) = "aut3"
        author(3) = "aut4"
   

        Dim publisher(4) As String
        publisher(0) = "pub1"
        publisher(1) = "pub2"
        publisher(2) = "pub3"
        publisher(3) = "pub4"
 
Back
Top