Solved

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

Posted on 2004-07-30
4
185 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 250 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

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…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

691 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