19 April, 2007

Interesting sample from the book

Hello. Yesterday I was reading one nice book about ASP.NET - ASP.NET: Tips, Tutorials and Code. In one chapter I have found an interesting code sample which shows how to work with Hashtable. Here is a piece of it:

Dim htSlaries As New Hashtable()

htSalaries.Add("Bob", 40000)
htSalaries.Add("John", 65000)
htSalaries.Add("Dilbert", 25000)
htSalaries.Add("Scott", 85000)
htSalaries.Add("BillG", 90000000)
' Then show this list in the label

Now guess who is BillG?! :) Firstly he gets his salary on paper and then employers change their mind :) Probably they decided that he has got enough already.

No comments: