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

  • Home
  • SEARCH
  • 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 7531063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:04:55+00:00 2026-05-30T05:04:55+00:00

I have two arrays a={a,b,c,d} b={1,2,3,4} now I want to create a 3rd array

  • 0

I have two arrays

a={a,b,c,d}
b={1,2,3,4}

now I want to create a 3rd array which should at least contains one numeric number and rest of alphabets, this code will generate unique usernames so it should not repeat the pattern of selection which is present in main array

Darray={abc1, acd2,...}

I united a and b

Dim c As String() = Barray.Union(Aarray).ToArray()

        Dim Carray(0 To 8) As String

I am thinking about having a do while loop here but don’t know how can I pass this conditions that it should get at least one number and should not repeat the pattern from Darray

do while (confused....)
        Dim rnd As New Random

        For i = 0 To 8

            Carray(i) = c(rnd.Next(0, c.Length))

        Next
loop
  • 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-05-30T05:04:56+00:00Added an answer on May 30, 2026 at 5:04 am

    Create a form, and paste this cod. It generates 100 codes, perhaps it is what you want? Add a listbox on the form and uncomment the ADD line to see the results.

     Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Dim aa() As String = {"a", "b", "c", "d"}
        Dim an() As String = {"1", "2", "3", "4"}
        Dim da As New Collection
        Dim rnd As New Random
        Dim i As Integer = 0
        While i < 100
            Dim j1 As Integer = rnd.Next(4)
            Dim j2 As Integer = rnd.Next(4)
            Dim rs As String = ""
            For k As Integer = 1 To 4
                If k = j2 Then
                    rs += an(j1)
                Else
                    Dim j3 As Integer = rnd.Next(4)
                    rs += aa(j3)
                End If
            Next
            If Not da.Contains(rs) Then
                da.Add(rs, rs)
                ' ListBox1.Items.Add(rs)
                i += 1
            End If
        End While
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an array of two dimensional Arrays. I want to create a new
I have two arrays which contain objects of assets, now I want to subtract
I have two arrays of System.Data.DataRow objects which I want to compare. The rows
I have two arrays. One contains id=>count and the other contains id=>name . I'm
I have this two arrays $views[] = $id; $pid[] = $page_id; which prints Array
I have two arrays of animals (for example). $array = array( array( 'id' =>
I have two arrays in PHP. The first array ($author_array) is comprised of user_ids
I have two arrays built while parsing a text file. The first contains the
I have two arrays: Array ( [2005] => 0 [2006] => 0 [2007] =>
I have two arrays, one is very large (more than million entries) and other

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.