-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: Jigs
Message 2 in Discussion
HASHTABLE: An object that is like a dictionary or an associative array. A hashtable
stores and retrieves elements using key values called hashcodes. A highly efficient
data structure that can look up most entries in just one step Public Class
SamplesHashtable
Public Shared Sub Main()
' Creates and initializes a new Hashtable.
Dim myHT As New Hashtable()
myHT.Add("First", "Hello")
myHT.Add("Second", "World")
myHT.Add("Third", "!")
' Displays the properties and values of the Hashtable.
Console.WriteLine("myHT")
Console.WriteLine(" Count: {0}", myHT.Count)
Console.WriteLine(" Keys and Values:")
PrintKeysAndValues(myHT)
End Sub
Public Shared Sub PrintKeysAndValues(myList As Hashtable)
Dim myEnumerator As IDictionaryEnumerator = myList.GetEnumerator()
Console.WriteLine(ControlChars.Tab + "-KEY-" + ControlChars.Tab _
+ "-VALUE-")
While myEnumerator.MoveNext()
Console.WriteLine(ControlChars.Tab + "{0}:" + ControlChars.Tab _
+ "{1}", myEnumerator.Key, myEnumerator.Value)
End While
Console.WriteLine()
End Sub
End Class
Regards,
Jignesh Desai
http://www.dotnetJiNi.com
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]