RSS Forums RSS
Please support our C# advertiser: Programming Forums
Views: 3144 | Replies: 3
Reply
Join Date: Aug 2005
Location: Ohio
Posts: 204
Reputation: plazmo is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 16
plazmo's Avatar
plazmo plazmo is offline Offline
Posting Whiz in Training

Array["name"] instead of Array[int]

  #1  
Nov 4th, 2005
im looking on how you can use an object in an array using a "name" instead of a number.

this would be just like a DataTable where you can use the tables name instead of its position in the array.

anyone have an idea how this is done? or am i looking past something simple?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2005
Location: Dallas, TX
Posts: 482
Reputation: campkev is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: Array["name"] instead of Array[int]

  #2  
Nov 4th, 2005
the only way I can think of would be to create your own class.
Reply With Quote  
Join Date: Nov 2005
Location: Mountain View, CA
Posts: 47
Reputation: kedar_challa is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
kedar_challa's Avatar
kedar_challa kedar_challa is offline Offline
Light Poster

Re: Array["name"] instead of Array[int]

  #3  
Nov 9th, 2005
Originally Posted by campkev
the only way I can think of would be to create your own class.

Hi,

Is there any perticular reason to use the Array. In Array datastructure the objects are indexed based on the integer value.

If you want to store the Key-Value pairs,you can use the following objects provided by .Net framework under System.Collections and System.Collections.Specialized namespace.

HashTable
DictionaryBase
NameValueCollection
ListDictionary
HybridDictionary

Thanks,
Kedar.
Reply With Quote  
Join Date: Aug 2005
Location: Ohio
Posts: 204
Reputation: plazmo is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 16
plazmo's Avatar
plazmo plazmo is offline Offline
Posting Whiz in Training

Re: Array["name"] instead of Array[int]

  #4  
Nov 11th, 2005
Hash table is exactly what i wanted thanks alot
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:04 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC