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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:16:56+00:00 2026-05-19T00:16:56+00:00

Back in the old days of C, one could use array subscripting to address

  • 0

Back in the old days of C, one could use array subscripting to address storage in very useful ways. For example, one could declare an array as such.

This array represents an EEPROM image with 8 bit words.

BYTE eepromImage[1024] = { ... };

And later refer to that array as if it were really multi-dimensional storage

BYTE mpuImage[2][512] = eepromImage;

I’m sure I have the syntax wrong, but I hope you get the idea.

Anyway, this projected a two dimension image of what is really single dimensional storage.

The two dimensional projection represents the EEPROM image when loaded into the memory of an MPU with 16 bit words.

In C one could reference the storage multi-dimensionaly and change values and the changed values would show up in the real (single dimension) storage almost as if by magic.

Is it possible to do this same thing using C#?

Our current solution uses multiple arrays and event handlers to keep things synchronized. This kind of works but it is additional complexity that we would like to avoid if there is a better way.

  • 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-19T00:16:57+00:00Added an answer on May 19, 2026 at 12:16 am

    You could wrap the array in a class and write 1-dimensional and 2-dimensional Indexer properties.

    Without validations etc it looks like this for a 10×10 array:

        class ArrayData
        {
            byte[] _data = new byte[100];
    
            public byte this[int x]          
            { 
                get { return _data[x]; } 
                set { _data[x] = value; }             
            }
    
    
            public byte this[int x, int y]
            {
                get { return _data[x*10+ y]; }
                set { _data[x*10 + y] = value; }
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Back in the old days, one would always need to scale images in Photoshop,
Back in the old days, text-to-speech, as cutting edge as it was, was very
Back in the old days, PalmOS had an emulator that could generate random events
I'm going back through one of my old apps (my first, actually), and am
Back in the old days, when using Visual source safe, i used to share
Back in the good old days of 68k, both pre/post pointer increments/decrements were more
I am an old time user of the Array of controls in VB back
Back in the old days, Help was not trivial but possible: generate some funky
Back in the old days (i.e. last month) I'd bind my winforms grid to
I got back on an old project and I ran the nice git status

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.