Need help searching 2D array in vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bradinar
    New Member
    • Apr 2010
    • 1

    Need help searching 2D array in vb.net

    Hello all,

    I am new to VB and i need to figure out how to use text boxes to search a 2 dimensional array. The array is for state abbreviations. One column is for the state name and one is for the abbreviation. What I want to do is have the user enter a state name in one textbox and display the abbreviation in another or vice-versa. My structure looks like this:

    Structure State
    Dim StateNameAbbrev iation As String
    Dim FullStateName As String
    End Structure

    array declared as so:

    Dim States(50, 1) As State

    I think i need to use a loop but i'm not sure where to start. Please help.
Working...