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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:32:18+00:00 2026-05-10T17:32:18+00:00

This has been driving me crazy for a few days. Why doesn’t the following

  • 0

This has been driving me crazy for a few days. Why doesn’t the following work?

    Dim arr(3, 3) As Integer      For y As Integer = 0 To arr.GetLength(0) - 1         For x As Integer = 0 To arr.GetLength(y) - 1             arr(y, x) = y + x         Next     Next 

Also, what if the array looked like this instead?

{ {1, 2, 3},   {4, 5, 6, 7, 8, 9, 9, 9},   {5, 4, 3, 2} } 
  • 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. 2026-05-10T17:32:19+00:00Added an answer on May 10, 2026 at 5:32 pm

    Ok, so what you really need is a ‘jagged array’. This will allow you to have an ‘array that contains other arrays of varying lengths’.

      Dim arr As Integer()() = {New Integer() {1, 2, 3}, New Integer() {4, 5, 6, 7, 8, 9, 9, 9}, New Integer() {5, 4, 3, 2}}    For x = 0 To arr.GetUpperBound(0)       Console.WriteLine('Row ' & x & ' has ' & arr(x).GetUpperBound(0) & ' columns')       For y = 0 To arr(x).GetUpperBound(0)           Console.WriteLine('(' & x & ',' & y & ') = ' & arr(x)(y))       Next    Next 

    Output:

    Row 0 has 2 columns (0,0) = 1 (0,1) = 2 (0,2) = 3 Row 1 has 7 columns (1,0) = 4 (1,1) = 5 (1,2) = 6 (1,3) = 7 (1,4) = 8 (1,5) = 9 (1,6) = 9 (1,7) = 9 Row 2 has 3 columns (2,0) = 5 (2,1) = 4 (2,2) = 3 (2,3) = 2 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 68k
  • Answers 68k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Just an FYI, The release you refer to - 3.0.0-stable0… May 11, 2026 at 12:23 pm
  • added an answer It's there to be overloaded if you feel the need;… May 11, 2026 at 12:23 pm
  • added an answer I think it's as simple as not converting to ASCII… May 11, 2026 at 12:23 pm

Related Questions

This has been driving me crazy for a few days. Why doesn't the following
This has been a problem that I haven't been able to figure out for
This has been an adventure. I started with the looping duplicate query located in
I been waiting for sometime now to bring my Asp.net Preview 4 project up
I created the following code to calculate the duration between two timestamps which can

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.