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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:51:32+00:00 2026-05-25T19:51:32+00:00

I have an object of objects, and I’m not sure how to access the

  • 0

I have an object of objects, and I’m not sure how to access the values. Here’s a picture from the VS debugger:

Debugger shows objects

the object in question is bounds. I’d like to get the value 7, 14, 157 and 174 like so:

bounds[0]  //Should equal 7
bounds[3]  //Should equal 174

Obviously this won’t work because it’s not an array but an object of objects. Could you explain the correct way to access the numeric values nested inside the bounds object?

Thank you!

  • 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-25T19:51:32+00:00Added an answer on May 25, 2026 at 7:51 pm

    You need to cast bounds from object to object[], get the value from the array, then cast it to double.

    object[] array = (object[])bounds;
    object value = array[0];
    double number = (double)value;
    

    or one line

    double value = (double)((object[])bounds)[0];
    

    If you put your numbers in an array of double in the first place, then you can avoid all the casting.

    double[] bounds = new double[x];
    ... populate array
    double value = bounds[0];
    

    Also, “bracket notation” is know as indexers.

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

Sidebar

Related Questions

Hello I was trying to remove objects from object array that I have and
I have an object that I'd like to inject in several objects of different
I have an object of objects, which I'd like to sort by property... having
Here is a utility method I have: public static Class<?>[] getTypes(Object[] objects){ Class<?>[] types
Suppose I have a design like this: Object GUI has two objects: object aManager
Say I have a task like: for(Object object: objects) { Result result = compute(object);
I have a list of objects: [Object_1, Object_2, Object_3] Each object has an attribute:
I have an object called users that I use to store user objects that
I have an Object X which contains a list of Objects X. I do
So I have an object which contains a set of objects in a private

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.