Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Combine 2 members of a class and re-define as one

Posted on 2004-07-30
4
Medium Priority
?
187 Views
Last Modified: 2010-04-15
Hi, I am very new to programming in general so I hope my terms are correct enough for someone to understand.

I have a cs page with the following public class and 2 members defined in the class:

//section I am refering to--------------------------------------------------

public class AccidentViolationContainer : Table
      {
            public ViolationList ViolationList = new ViolationList();
            public AccidentList AccidentList = new AccidentList();
       
//End of section I am refering to---------------------------------------------------

            public AccidentViolationContainer()
            {
                  for (int i = 0; i <= 10; i++)
                  {

                                                                .. so , and so..
               
I need to combine "public ViolationList ViolationList = new ViolationList();" and "public AccidentList AccidentList = new AccidentList();" here :

public class AccidentViolationContainer : Table
      {
            public ViolationList ViolationList = new ViolationList();
            public AccidentList AccidentList = new AccidentList();

...and call it something new. How do I do that?
0
Comment
Question by:dmullis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 1000 total points
ID: 11681521
from looking at it ...

            public ArrayList AccidentAndViolationList
            {
                  get
                  {
                        ArrayList ret = new ArrayList();
                        ret.AddRange(AccidentList);
                        ret.AddRange(ViolationList);
                        }
            }

will build an untyped list from the two lists ...
0
 

Author Comment

by:dmullis
ID: 11694353
Hi Gregory,

 I am going to investigate this possible solution, give it a try and get back to the boards.

Thanks.
0
 

Author Comment

by:dmullis
ID: 11738455
Thanks Gregory.
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 11739918
anytime.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

618 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