18
1
Option Strict On
2
Imports System
3
Imports System.Collections.Generic
4
Public Module Module1
5
Public Sub Main()
6
'Declare a Dictionary(Of String, Double) to represent the menu's item name and respective price
7
Dim menu As Dictionary(Of String, Double) = New Dictionary(Of String, Double)
8
9
'Add some menu items and their respective price
10
menu.Add("Soft Drink", 1.0)
11
menu.Add("Hamburger", 5.0)
12
menu.Add("Hot Dog", 3.5)
13
menu.Add("Nachos", 3.5)
14
15
'Print out the price for a Hamburger
16
Console.WriteLine(menu.Item("Hamburger"))
17
End Sub
18
End Module
Cached Result