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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:40:25+00:00 2026-05-28T13:40:25+00:00

I wondered, if it was possible to access a specific element of a multidimensional

  • 0

I wondered, if it was possible to access a specific element of a multidimensional array using an array, rather than multiple integers.

Like for example:

int[,] map = sampleMap;
int[] position = { 1, 2 };

sampleObject = map[position]; // This line won't work. "cannot implicitly convert type 'int[]' to 'int'"

Instead of:

sampleObject = map[position[1], position[2]]

Of course, when working with only 2 dimensions, it wouldn’t be much of a problem, but imagine I had many dimensions, like 10:

map[position[1], position[2], position[3], ..., position[10]]

It would be much nicer and more elegant, to just write:

map[position]

I’ve been looking around, but the best I found was “How to access Arrays in [insert programming language here]” or “how to access elements from [insert Array type here]” or things like that.

  • 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-28T13:40:26+00:00Added an answer on May 28, 2026 at 1:40 pm

    Take a look at Array.GetValue(int[]) method

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

Sidebar

Related Questions

i wondered if it's possible to just reload a specific div of a page
I just wondered whether it's possible to match against the same values for multiple
I have using .on() in jQuery 1.7 and wondered whether it is possible to
I can set up an autofilter using pyWin32, but I wondered if it's possible
I wondered is it possible to write mobile safari extensions? XPCOM(NSPR) like extension or
I wondered if this was possible: It looks like this: <tr> <td> Full Name:
We're using a community edition of Jira and wondered if it's possible to send
I wondered if this would be possible. I'd like to centralize my cakePHP core
I wondered if it is possible to show picture in a view without calling
I wondered if it's possible to write some data to CSV file in the

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.