Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8814319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:05:25+00:00 2026-06-14T04:05:25+00:00

this is very important. The situation: I am building a game with registering facility.

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:05:26+00:00Added an answer on June 14, 2026 at 4:05 am

    Something like this?

    Dim found As Boolean = False
    For Each u As typRegistrationDetails In strUsers
        If u.strUserName = strUserName AndAlso
           u.strPassword = strPassword Then
            found = True
            Exit For
        End If
    Next
    If found Then
        ' do something
    Else
        ' do something else
    End If
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Before I explain my situation, please have a look at the very important notice!!
Important : Please see this very much related question: Return multiple values in C++
I ask this academically, I want to ask aloud a very important question and
This very simple code: #include <iostream> using namespace std; void exec(char* option) { cout
I'm using this very handy plugin to sort elements. But comparing elements on a
I have this very simple jQuery function: $(.milestone-in-tree).live({ mouseenter: function() { setTimeout( $.ajax({ type:
I have this very simple br2nl function that I use to take a string
For a website I am building, I am using jQuery to post data to
So part of my web app centers around this very important form which is
Hi jquery Gurus I am new to this and I have a very difficult

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.