this is very important.
The situation:
I am building a “game” with registering facility. I am using data structures and arrays. I have everything I need already, but the login. I need a loop that will:
- loop through an array/record
- compare what’s in the array/record to what a user has entered into textboxes
- run other code
These are my storage methods:
Public Structure typRegistrationDetails
Dim strUsername As String
Dim strPassword As String
End Structure
Public Shared strUsers(0 To 2) As typRegistrationDetails
Number of users is for now limited to 3; each strUsers contains strUsername and strPassword.
I have already written code to register, tell me if you need to see it.
So now, I need a loop that will loop through the above structures and compare their values with what a user has entered.
I mean if txtUsername.Text (user input) and txtPassword.Text (user input) match one of strUsers(index) then do something, else do something else.
Something like this?