Solved

ArrayList of Objects

Posted on 2006-07-13
4
186 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
Comment Utility
Cancel figured it out, just cast it to a tempColumn.

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

Author Comment

by:codeshelp
Comment Utility
refunding points
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 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

14 Experts available now in Live!

Get 1:1 Help Now