How to create an array of an indeterminate number of classes


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: How to create an array of an indeterminate number of classes

  1. #1
    Chris Kinsman Guest

    How to create an array of an indeterminate number of classes

    I have an ADO+ DataReader I am iterating through to populate an array of
    classes. I don't know how many records I will get back so how do I
    dimension the array.

    What is the c# equivalent of a collection?





  2. #2
    news.devx.com Guest

    Re: How to create an array of an indeterminate number of classes

    Why create your own array to hold the records? why not use the
    dataset/datatable?



    "Chris Kinsman" <ckinsman@devx.com> wrote in message
    news:3986fca3@news.devx.com...
    > I have an ADO+ DataReader I am iterating through to populate an array of
    > classes. I don't know how many records I will get back so how do I
    > dimension the array.
    >
    > What is the c# equivalent of a collection?
    >
    >
    >
    >




  3. #3
    Chris Kinsman Guest

    Re: How to create an array of an indeterminate number of classes

    It is a compound structure. I could create a "shaped" recordset I guess to
    hold the master-detail style data I am trying to model...

    "news.devx.com" <kaisert@earthlink.net> wrote in message
    news:398740e0@news.devx.com...
    > Why create your own array to hold the records? why not use the
    > dataset/datatable?
    >
    >
    >
    > "Chris Kinsman" <ckinsman@devx.com> wrote in message
    > news:3986fca3@news.devx.com...
    > > I have an ADO+ DataReader I am iterating through to populate an array of
    > > classes. I don't know how many records I will get back so how do I
    > > dimension the array.
    > >
    > > What is the c# equivalent of a collection?
    > >
    > >
    > >
    > >

    >
    >




  4. #4
    Tom Kaiser Guest

    Re: How to create an array of an indeterminate number of classes

    The dataset enables you to create multiple tables and build relationships
    between them.

    So, I could have a table called "customer" and a table called "Orders" with
    a relationship between them.
    Then through the object model I could traverse the relationship to get all
    of the associated order for customer 1.

    I fill/update the table by using a datasetcommand (ADODataSetCommand or
    SQLDataSetCommand).

    The dataset gives you a simple programming model over relational and
    hierarchical data.



    "Chris Kinsman" <ckinsman@devx.com> wrote in message
    news:39874232$1@news.devx.com...
    > It is a compound structure. I could create a "shaped" recordset I guess

    to
    > hold the master-detail style data I am trying to model...
    >
    > "news.devx.com" <kaisert@earthlink.net> wrote in message
    > news:398740e0@news.devx.com...
    > > Why create your own array to hold the records? why not use the
    > > dataset/datatable?
    > >
    > >
    > >
    > > "Chris Kinsman" <ckinsman@devx.com> wrote in message
    > > news:3986fca3@news.devx.com...
    > > > I have an ADO+ DataReader I am iterating through to populate an array

    of
    > > > classes. I don't know how many records I will get back so how do I
    > > > dimension the array.
    > > >
    > > > What is the c# equivalent of a collection?
    > > >
    > > >
    > > >
    > > >

    > >
    > >

    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center