1: Imports System.Windows.Forms
2:
3: Module NewInVB90
4: Private Sub MyLocalTypeInference()
5: Dim i = 10
6: Dim s = "VB 9.0"
7: Dim d = 2.56
8: Dim c = "R"c
9: Dim b = True
10: Dim t = #10/9/2007#
11:
12: MessageBox.Show(i.GetType.ToString, "Local Type Inference")
13: MessageBox.Show(s.GetType.ToString, "Local Type Inference")
14: MessageBox.Show(d.GetType.ToString, "Local Type Inference")
15: MessageBox.Show(c.GetType.ToString, "Local Type Inference")
16: MessageBox.Show(b.GetType.ToString, "Local Type Inference")
17: MessageBox.Show(t.GetType.ToString, "Local Type Inference")
18: End Sub
19:
20: Sub Main()
21: MyLocalTypeInference()
22: End Sub
23: End Module