Я новичок, самостоятельно изучающий VB, с VS 2012 в качестве IDE.
У меня 2 программы, # 1 работает, # 2 нет?Пожалуйста, предложите, почему (# 1 не работает)?
'Program #1
Module Module1
' calculation of square root of 2
Sub Main()
Dim root As Double = Math.Sqrt(2)
MsgBox("The square root of 2 is " & root)
End Sub
End Module
'Program #2
Imports System.Windows.Forms ' namespace containing MessageBox
' calculation of square root of 2
Module mSquareRoot
Sub Main()
Dim root As Double = Math.Sqrt(2)
MessageBox.Show("The square root of 2 is " & root)
End Sub
End Module