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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:27:41+00:00 2026-05-16T05:27:41+00:00

Possible Duplicate: What are the differences between using int[][] and int[,]? I just came

  • 0

Possible Duplicate:
What are the differences between using int[][] and int[,]?

I just came across this notation:

int[,]

Whenever i needed a matrix I used:

int[][]

What is the difference? When to use which one?

Edit:
Thanks for the quick responses. I could’ve thought of that. It’s also hard to google for stuff like this.

Now I understand the purpose. But how do they relate to System.Array?

  • 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-16T05:27:42+00:00Added an answer on May 16, 2026 at 5:27 am

    int[,] is a rectangular array – one object which has two dimensions. Each element of the array is an integer; all elements are stored contiguously in memory.

    int[][] is a jagged array – an array where each element is in turn an int[]. (So it’s an array of arrays.) Although each element of the “top level” array is stored contiguously, those elements are just references to other arrays, which could be anywhere in memory.

    Whereas rectangular arrays always have the same number of columns per row, in a jagged array each element could have a different length (or indeed may be null).

    Each has its own advantages and disadvantages; rectangular arrays are more compact in terms of memory, but don’t allow sparse population. Jagged arrays are faster in the CLR, but don’t have as good cache coherence. The extra space taken up by the “row arrays” in jagged arrays can be significant in some cases – if you have an int[10000, 2] that will only take up 80000 bytes plus the overhead of one array object, whereas in a jagged array it would be the 80000 bytes for the data and the overhead of 10001 array objects.

    MSDN has more information in its arrays tutorial.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 489k
  • Answers 489k
  • 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
  • Editorial Team
    Editorial Team added an answer It depends on a bit on your scenario but the… May 16, 2026 at 9:04 am
  • Editorial Team
    Editorial Team added an answer In order to completely answer your question, I have to… May 16, 2026 at 9:04 am
  • Editorial Team
    Editorial Team added an answer How about something like: event_prices = [] event_dates = []… May 16, 2026 at 9:04 am

Trending Tags

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

Top Members

Related Questions

Possible Duplicate: Difference between void main and int main? Alright, so I'm using bloodshed
Possible Duplicate: Difference between using var and not using var in JavaScript Hello, I
Possible Duplicate: Ruby: difference between || and ‘or’ Using Ruby || and or are
Possible Duplicate: What is the difference between using #include<filename> and #include<filename.h> in c++ I've
Possible Duplicate: Is there a difference in C++ between copy initialization and assignment initialization?
Possible Duplicate: What is the difference between app.config file and XYZ.settings file? I'm not
Possible Duplicate: #pragma once vs include guards? What are the differences (in performance, usability
Possible Duplicate: Difference between lock(locker) and lock(variable_which_I_am_using) In all of the thread-safe code examples
Possible Duplicates: Should I use public properties and private fields or public fields for

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.