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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:10:50+00:00 2026-05-30T01:10:50+00:00

How do I access a row of a 2-dimensional array in C#? I want

  • 0

How do I access a row of a 2-dimensional array in C#? I want to get the count of row i.

Thanks!

  • 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-30T01:10:52+00:00Added an answer on May 30, 2026 at 1:10 am

    The question really depends on what type of 2D array you are thinking about and what dimension your row is.

    Proper 2D array

    // Init
    var arr = new int[5,10];
    
    // Counts
    arr.GetLength(0) // Length of first dimension: 5
    arr.GetLength(1) // Length of second dimension: 10
    

    Jagged “2D” array

    // Init
    var arr = new int[3][];
    // Initially arr[0],arr[1],arr[2] is null, so we have to intialize them:
    arr[0] = new int[5];
    arr[1] = new int[4];
    arr[2] = new int[2];
    
    // Counts
    arr.Length // Length of first dimension
    // In this case the "second dimension" (if you can call it that) is of variable size
    arr[0].Length // Length: 5
    arr[1].Length // Length: 4
    arr[2].Length // Length: 2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to insert a new row into an Access database. I'm looking at
How do I access the first level key of a two-dimensional array using a
Given this two-dimensional array, each element has two indexes – row and column. <?php
How to access the row which has just been inserted into a DB with
How can you access and display the row index of a gridview item as
PHP/MySQLisolating database access in class - how to handle multiple row Selects Here’s a
I would like to change the Row Source values in an Access table through
My question is: How can I access row information using index in JSTL? i
How can I show a MS-Access listbox row highlighted? I'm using MS-Access 2007. I
Right now I access each row and cells of a table like this: $f

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.