473,498 Members | 1,956 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Nov 20 '05 #1
3 1991
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

Nov 20 '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

Nov 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
Nov 21 '05 #4

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

Similar topics

3
1446
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 ...? ...
10
17182
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
1392
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
1428
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...
1
1563
by: dx | last post by:
Any ideas? I can't find any examples that support this. I'm thinking a solution may be something like inherting arraylist and containing a hashtable. or Inheriting NameObjectCollectionBase...
4
1461
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
4844
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
2061
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
1863
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
1505
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
7002
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
7165
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,...
1
6885
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
7379
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...
1
4908
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4588
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
290
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.