Tech Off Thread

5 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Generic hashtable

Back to Forum: Tech Off
  • User profile image

    Is there a generic hashtable class in .NET 2.0?I can't find a class that has that type of functionality.

    I tried KeyedCollection<TKey, TItem> butI am no satisfied with it. (the Add method looks like this: void Add(TItem);, which doesn't behave like a hashtable.)

  • User profile image

    As in System.Collections.Hashtable?

    Or literally, a "C# Generic" class?

  • User profile image

    System.Collections.Generic is a namespace. I am looking for a strongly typed hashtable class. I can easily implement this, but I was just wondering if there is already one.

  • User profile image

    Well, don't know about a hashtable, but there is the Dictionary class in System.Collections.Generic.

  • User profile image

    You can use Dictionary<TKey,TValue>. it's generic hashtable.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.