Home All Groups Group Topic Archive Search About

Which collection object to use similar to SortedList\Hashtable

Author
16 Feb 2006 6:25 PM
Kiran
Hi,

I need to store two columns of values in an object after getting the
same from a dataset\similar object.

1. I need to sort this data at one place, so I use sortedlist here.

2. In another place, I just need to store the data and pass it to a
business object where it gets further processed, so I use HashTable here.

this is the sample data that I store
1    10.34
2    67.89
6    89.78

presently I use sortedlist and hastable.

is this ok performance wise and is there any other alternative object
that I can use instead of these in VB.Net(2003)


Please provide ur comments.

Thanks
KiranW

Author
18 Feb 2006 3:06 AM
Nathan Sokalski
Well, first I want to ask why you don't just leave it in the DataSet?
Second, what/where/how are you using the data? This can have an influence on
what technique is most efficient. I think that both me and others will be
able to help you better if you supply this information. Good Luck!
--
Nathan Sokalski
njsokal***@hotmail.com
http://www.nathansokalski.com/

Show quoteHide quote
"Kiran" <some***@somewhere.com> wrote in message
news:%23oJuNayMGHA.3392@TK2MSFTNGP14.phx.gbl...
> Hi,
>
> I need to store two columns of values in an object after getting the same
> from a dataset\similar object.
>
> 1. I need to sort this data at one place, so I use sortedlist here.
>
> 2. In another place, I just need to store the data and pass it to a
> business object where it gets further processed, so I use HashTable here.
>
> this is the sample data that I store
> 1 10.34
> 2 67.89
> 6 89.78
>
> presently I use sortedlist and hastable.
>
> is this ok performance wise and is there any other alternative object that
> I can use instead of these in VB.Net(2003)
>
>
> Please provide ur comments.
>
> Thanks
> KiranW
Author
18 Feb 2006 12:08 PM
Kiran
Hi Nathan,

Firstly thanks for the reply.(No one gave their response for the past
few days)

I get the rows from a grid(rows only selected by the user, I use a
checkbox column for this).

I have two such grids and get two such lists(with two cols: ID and value
in each of the list)

I use a sorted list to sort the data and compare both and do some
calculations.

As a result of this calculations, I add a few rows(two cols: ID, value)
in to new hashtable.

using this hashtable I then make the appropriate database changes.

Is there an alternative object that I can use in vb.net instead of
sortedlist and hashtable(looking at performance....)

Hope you understand, awaiting your reply.

Thanks
Kiran

Nathan Sokalski wrote:
Show quoteHide quote
> Well, first I want to ask why you don't just leave it in the DataSet?
> Second, what/where/how are you using the data? This can have an influence on
> what technique is most efficient. I think that both me and others will be
> able to help you better if you supply this information. Good Luck!
Author
18 Feb 2006 6:55 PM
Nathan Sokalski
One thing you could try is a multi-dimensional Array, and use Array.Sort()
to sort it. I'm not sure what other suggestions to make, your situation
sounds like the kind where it's hard to know "The Best Solution" without
actually seeing everything. Good Luck!
--
Nathan Sokalski
njsokal***@hotmail.com
http://www.nathansokalski.com/

Show quoteHide quote
"Kiran" <some***@somewhere.com> wrote in message
news:%2303iZQINGHA.1536@TK2MSFTNGP11.phx.gbl...
> Hi Nathan,
>
> Firstly thanks for the reply.(No one gave their response for the past few
> days)
>
> I get the rows from a grid(rows only selected by the user, I use a
> checkbox column for this).
>
> I have two such grids and get two such lists(with two cols: ID and value
> in each of the list)
>
> I use a sorted list to sort the data and compare both and do some
> calculations.
>
> As a result of this calculations, I add a few rows(two cols: ID, value) in
> to new hashtable.
>
> using this hashtable I then make the appropriate database changes.
>
> Is there an alternative object that I can use in vb.net instead of
> sortedlist and hashtable(looking at performance....)
>
> Hope you understand, awaiting your reply.
>
> Thanks
> Kiran
>
> Nathan Sokalski wrote:
>> Well, first I want to ask why you don't just leave it in the DataSet?
>> Second, what/where/how are you using the data? This can have an influence
>> on what technique is most efficient. I think that both me and others will
>> be able to help you better if you supply this information. Good Luck!