By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,887 Members | 1,170 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,887 IT Pros & Developers. It's quick & easy.

Which collection object to use similar to SortedList\Hashtable

P: n/a
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
Feb 16 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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
nj********@hotmail.com
http://www.nathansokalski.com/

"Kiran" <so*****@somewhere.com> wrote in message
news:%2****************@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

Feb 18 '06 #2

P: n/a
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!

Feb 18 '06 #3

P: n/a
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
nj********@hotmail.com
http://www.nathansokalski.com/

"Kiran" <so*****@somewhere.com> wrote in message
news:%2****************@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!

Feb 18 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.