SEVI Posted August 24, 2003 Posted August 24, 2003 Question: Does the hashtable class have an item method? All documentation says it should. MSDN says it should, other sources confirm this. But I have not been able to use it, becuase it does not seem to be there !! As I understand it I should be able to just create a hashtable and the method should be available as a member of h, below.. System.Collections.Hashtable h = new System.Collections.Hashtable(); I'm using C# 2003 and cannot fingure out what is going on. Can anyone shed some light on this? Thanks Quote
wyrd Posted August 24, 2003 Posted August 24, 2003 using System.Collections; Hashtable h = new Hashtable(); h.Add(key, value); object o = h[key]; Should work. Quote Gamer extraordinaire. Programmer wannabe.
*Experts* mutant Posted August 24, 2003 *Experts* Posted August 24, 2003 In C# Item property is an indexer. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.