• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 204
  • Last Modified:

ArrayList of Objects

Object 'Section' has an array list of 'Column' objects.
Column object has an int field called 'subColumns'

int a = Section.Column[<instance>].subColumns;

How do I access this field?  I don't want to do a foreach.

Thank you!
0
codeshelp
Asked:
codeshelp
  • 2
1 Solution
 
codeshelpAuthor Commented:
Cancel figured it out, just cast it to a tempColumn.

Column tempColumn            = (Column)Section.Column[instance];
0
 
codeshelpAuthor Commented:
refunding points
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now