Hash table will useful for optimization of look ups. It is old dotnet frame work class, which is slower than the dictionary type collection.
For example:
For example:
using System; using System.Collections; class Example { static void Main() { Hashtable objHash= new Hashtable(); objHash[7] = "India"; objHash[8] = "US"; objHash[9] = "London"; foreach (DictionaryEntry value in objHash) { Console.WriteLine("{0}, {1}", value.Key, value.Value); } } }
Output:9,London 8, US 7, India
Post a Comment
Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.