Solved

Data Structures in VB.NET 2003 / 2005 !!

Posted on 2007-03-18
13
262 Views
Last Modified: 2013-11-26
Hi,

I have the following objects:

1. ArrayList
2. SortedList
3. Stack
4. Queue
5. HashTable
6. ListDictionary
7. HybridDictionary
8. OrderedDictionary
9. NameValueCollection
10.BitArray
11.StringCollection
12.StringDictionary

I want to divide them into categories...Here are they

1. ICollection
2. IList
3. IDictionary

Can you please divide the objects into the above categories ? Advance thanks for your time & patience.

Thanks
0
Comment
Question by:kishore_peddi
  • 7
  • 6
13 Comments
 
LVL 47

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 18746429
IList and IDictionary inherit from ICollection for a start, so you'll have problems categorizing them like that.

Is this homework?
0
 

Author Comment

by:kishore_peddi
ID: 18746445
Hi webtubbs,

Thanks for asking me. This is NOT home work. I came across in one book. They have divided into 3 categories. I have also got the same doubt like you regarding that :) That is the reason i have posted this on EE. I thought that that is on top of my head. If you want i will give you the book name !!

Thanks
0
 

Author Comment

by:kishore_peddi
ID: 18746450
Hi webtubbs,

If you want i will post what was written there in that book and how they have categorized. Still i am NOT satified with the way they have written !! Please try to understand.

Thanks
0
 
LVL 47

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 18746579
kishore_peddi,

OK, I understand. How did they categorize them in the book?

Wayne
0
 

Author Comment

by:kishore_peddi
ID: 18750336
Hi webtubbs,

Here is what i have got from the book:

Collections :-

1. ICollection (Stack, Queue)
2. IList (ArrayList)
3. IDictionary (HashTable, SortedList)

Something interesting :)

0
 
LVL 47

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 18752048
This is what MSDN has to say....

Classes that Implement ICollection

     ArrayList
     BitArray
     Hashtable
     HybridDictionary
     Queue
     SortedList
     Stack
     StringCollection

Classes that implement IList

     ArrayList
     StringCollection

Classes that implement IDictionary

     Hashtable
     HybridDictionary
     ListDictionary
     OrderedDictionary
     SortedList

As you can see, there a few that implement a couple different classes. I do kinda understand how they've categorized them though. A Stack only implements ICollection, an ArrayList is realy a list, and a HashTable uses Key/Value pairs, so belongs to IDictionary.

Regards,

Wayne

0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

by:kishore_peddi
ID: 18754271
mmm...I have carefully gone through the book once again. Here is a little bit word i have missed from the whole sentance. THEY ARE BASED ON PRIMARY INTERFACE THEY IMPLEMENT. Now can you please categorize them ?

Sorry for my mis-understand. Over-looked a single word (Primary Interface).

Thanks
0
 
LVL 47

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 18754298
I'd categorize them like this, if we are using the Primary interface as the category...

- ICollection

     BitArray
     Queue
     Stack
     StringCollection

- IList

     ArrayList
     StringCollection

- IDictionary

     Hashtable
     HybridDictionary
     ListDictionary
     OrderedDictionary
     SortedList
     StringDictionary
0
 

Author Comment

by:kishore_peddi
ID: 18754343
SortedList comes under IDictionary ? Just curious....
0
 

Author Comment

by:kishore_peddi
ID: 18754370
webtubbs,

Good to see your list. BUT i still do not know SortedList comes under IDictionay or NOT !! Can you verify it once again ?

Thanks
0
 

Author Comment

by:kishore_peddi
ID: 18754378
I'd categorize them like this, if we are using the Primary interface as the category...

- ICollection

     BitArray
     Queue
     Stack
     StringCollection

- IList

     ArrayList
     StringCollection

- IDictionary

     Hashtable
     HybridDictionary
     ListDictionary
     OrderedDictionary
     SortedList
     StringDictionary

And we have repeated      

StringCollection

twice !! Can we please look into this ?
0
 
LVL 47

Accepted Solution

by:
Wayne Taylor (webtubbs) earned 500 total points
ID: 18754421
- ICollection

     BitArray
     Queue
     Stack

- IList

     ArrayList
     StringCollection

- IDictionary

     Hashtable
     HybridDictionary
     ListDictionary
     OrderedDictionary
     SortedList
     StringDictionary
0
 
LVL 47

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 18754424
SortedList does belong in IDictionary. It uses Key/Value pairs.

All this information is be available in MSDN.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now