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 6676171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:57:13+00:00 2026-05-26T03:57:13+00:00

i am currently looping through this with vb.net and writing on the console: fruits

  • 0

i am currently looping through this with vb.net and writing on the console:

fruits orange 
fruits banana
fruits apple
numbers 1
numbers 2
numbers 3
numbers 4
numbers 5
numbers 6
etc...

however, i would like to store my values like this this:

array (
  "fruits"  => array (
    "a" => "orange",
    "b" => "banana",
    "c" => "apple"
  ),
  "numbers" => array (1,2,3,4,5,6),
  "holes"   => array (
         "first",
    5 => "second",
         "third"
  )
);

then when i get this, i would like to loop through each

array (
  "fruit" => "orange",
  "b" => "banana",
  "c" => "apple"
)

and check for certain values.
i can do this easily in php, however, vb.net leaves me ARGH.

any ideas?

  • 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-26T03:57:14+00:00Added an answer on May 26, 2026 at 3:57 am

    You can easily do it in vb.net too.

        Dim arr As Dictionary(Of String, Object) = New Dictionary(Of String, Object)
    
        arr.Add("fruits", {"orange", "banana", "apple"})
        arr.Add("numbers", {1, 2, 3, 4, 5, 6})
        arr.Add("holes", {"first", "second", "third"})
    
        For Each key As KeyValuePair(Of String, Object) In arr
            For Each obj As Object In key.Value
                Console.WriteLine(key.Key & " " & obj.ToString)
            Next
        Next
    
        Console.ReadLine()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently looping through a datareader and calling the System.Net.Mail.SmtpClient's Send() method. The problem
I'm currently using the ARKit ported by the http://iphonear.org guys, looping through a fetched
I have a foreach looping through a List of objects in an ASP.NET MVC/Razor
I am currently working with an ASP.NET MVC 4 project, using C#. I would
I'm running some code through FxCop and am currently looking at clearing all of
Currently looking into learn new technology and silverlight is on the potential list. However,
My website currently working in ASP.NET 1.1 Old Process In our database we have
I'm currently employed at a small ASP.NET/MS-SQL shop. My team has noticed that a
I've got a repeater looping through a list of objects that are of different
I'm writing an app in C#/.NET 4.5 and I have a dictionary defined like

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.