, VS File/ New/Project. New Project. , . Console Application. , . , New Project, .NET Framework, , , , .
, , . Solution Explorer. , , , , . .
, . , . Module1.vb.
VS , . (Debugging) . , (breakpoints) . , , .
( ), Debug\ Start Without Debugging <Ctrl>+<F5>. .
, Debug\ Start Debugging, <F5>. , .
, . , , , . , . , , , .
.
Sub Main . New Project (Console Application), VB.NET Sub Main:
|
|
Module Module1
Sub Main()
End Sub
End Module
( ). Modulel, . . , : Module Testl :
Startup code 'Sub Main' was specified in 'Test.Modulel'.
but 'Test.Modulel' was not found
:
.
.
ConsoleApplication Properties.
, Startup object .
VB.NET () , Sub Main . End Sub Sub Main. , Hello world :
Module Modulel
Sub Main()
H=34+Math.Sin(23)
Console.WriteLine( & H)
Console.ReadKey()
End Sub
End Module
IDE, ( ) DOS Hello world. End Sub.
, , Enter ( ReadLine() ).
Module Modulel
Sub Main()
Console.WriteLine("Hello world")
Console. ReadLine()
End Sub
End Module
, VB.NET: . (.) . ( , ), . :
Console.WriteLine("Hell world")
WriteLine Console, . WriteLine (shared) , . WriteLine . Hello world ReadLine, Enter ( ReadLine , . ).
, ReadLine ReadKey() Console, .
VB.NET, BASIC, ( , ). , , .
VS.NET IDE VB.NET . , (End SUB End Sub . .). VB.NET Pascal ( , ). (writeLine) VB.NET .
|
|
VB.NET , , . , (_), . , , Enter . , IDE .
VB.NET, , . . VB.NET . , :
Sub Main()
Console.WriteLine("Hello world")
' , ReadLine
Console. ReadLine()
End Sub
Rem, BASIC 1960- !
, Rem . VB.NET , , .
5. .
. .