Menu

Program structure, modules and the Main method — VB.NET
📰

Program structure, modules and the Main method — VB.NET

DEV Community: dotnet·DIVAKAR UPADHYAY·4 days ago
#COQDg5W5
#devtodotnet#devto#dev#option#args
Reading 0:00
15s threshold

Lesson 1 of 12 in the free VB.NET — Visual Basic .NET from Basics to Advanced (with C# Comparison) course on DevLadder.

Option Strict On ' no implicit narrowing conversions or late binding — always turn on Option Explicit On ' every variable must be declared Option Infer On ' allow Dim x = 5 (type inferred)

Imports System.Text ' = C# using

Namespace Divakar.Shop Module Program ' a Module = C# static class; members are Shared automatically Sub Main ( args As String ()) Console . WriteLine ( "Hello, Divakar!" ) Dim name As String = If ( args . Length > 0 , args ( 0 ), "world" ) Console .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.