Solved

ArrayList of Objects

Posted on 2006-07-13
4
187 Views
Last Modified: 2010-04-16
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
Comment
Question by:codeshelp
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
codeshelp earned 0 total points
ID: 17100192
Cancel figured it out, just cast it to a tempColumn.

Column tempColumn            = (Column)Section.Column[instance];
0
 
LVL 3

Author Comment

by:codeshelp
ID: 17100195
refunding points
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now