473,395 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Collection, HashTable or SortedList?

Hi,

I read somewhere that it would be better to use a HashTable or a SortedList
instead of a collection in VB.NET. Is this true and why is this better? Is
it faster or more performant or ...?

Any info would be nice!

Pieter
Jul 21 '05 #1
3 1444
Hi,

The hashtable and sortedlist store data in a dictonary entry
(key, data) making it easier to look up values. The collection supports the
ilist interface allowing you to databind a collection.

Ken
---------------------------
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:O8**************@TK2MSFTNGP11.phx.gbl...
Hi,

I read somewhere that it would be better to use a HashTable or a SortedList
instead of a collection in VB.NET. Is this true and why is this better? Is
it faster or more performant or ...?

Any info would be nice!

Pieter

Jul 21 '05 #2
Hm, but is there anyone of them (or maybe another) that has better
perfomance than the others?

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:Oc**************@TK2MSFTNGP11.phx.gbl...
Hi,

The hashtable and sortedlist store data in a dictonary entry
(key, data) making it easier to look up values. The collection supports the ilist interface allowing you to databind a collection.

Ken
---------------------------
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:O8**************@TK2MSFTNGP11.phx.gbl...
Hi,

I read somewhere that it would be better to use a HashTable or a SortedList instead of a collection in VB.NET. Is this true and why is this better? Is
it faster or more performant or ...?

Any info would be nice!

Pieter

Jul 21 '05 #3
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hm, but is there anyone of them (or maybe another) that has better
perfomance than the others?


I use all three, and have never seen a measurable difference. It is all
fast as blazes.

Best Regards,

Andy
Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Mart | last post by:
What class does everyone out there use if they want to store a set of values efficiently? In java I use a HashSet, but there is no equivalent in C#. Even worse, the lowest level interface to...
2
by: mark4asp | last post by:
Hello, I am converting an app from JavaScript to ASP.NET I have the following JavaScript 'associative array'. Is there a concise way to create an analogous structure in .NET Framework using...
2
by: Tiësto | last post by:
Hi guys, I've trying to find a collection for a very common task without any luck. I only need a collection of Key/Value objects, cause I need to check whether a key as been added and if not, get...
3
by: DraguVaso | last post by:
Hi, I read somewhere that it would be better to use a HashTable or a SortedList instead of a collection in VB.NET. Is this true and why is this better? Is it faster or more performant or ...? ...
4
by: Michael Rich | last post by:
Can anyone point me to a collection class that has serialization/deserialization with it - preferably in XML. I know this can't be done with a collection that inherits from CollectionBase, but...
3
by: Kiran | last post by:
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...
8
by: Martin Pöpping | last post by:
Hello, I´ve implemented a Hashtable with Int-Keys and Double Values. Now I want to get the i-th Int-Key of my hashtable. How do I do that? I tried it like that: ICollection intKeys =...
6
by: Burt | last post by:
I need to create a collection of classes (or structures) can be accessed by a string key, eg MyColl("ShortName5").Name for class with key ShortName5. But it also has to be sorted by a second...
5
by: jwilson128 | last post by:
I am looking for some help on the best type of collection to use and/ or best way to implement the collection with the following functionality: I have defined an object to represent an interest...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.