Solved

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

Posted on 2004-07-30
4
180 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
  • 2
  • 2
4 Comments
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks Gregory.
0
 
LVL 37

Expert Comment

by:gregoryyoung
Comment Utility
anytime.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

772 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