VB.Net - SPLessons

VB.Net Programming Structure

Home > Lesson > Chapter 4
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

VB.Net Programming Structure

VB.Net Programming Structure

shape Description

Before starting learning of programming in VB.Net, user should know about What is the programming structure of the VB. Net. With out knowing the basic software languages like c and c++ it is easy to learn VB.Net why because as earlier discussed everything is here drag and drop, but while making an application in console it is mandatory to know about the flow of the code so following are the some steps to be placed in the code.

shape Conceptual figure

Following is the figure which shows  the basic programming structure of VB.Net.

shape Example

Following is an example to print "Hello Word" message in VB.Net. [vbnet] Imports System 'Namespace Module Module1 'Equals to Class in C# Shared Sub Main() ' Procedure Console.WriteLine("Hello World") 'Prints Hello World Console.ReadKey() 'This statement is used to prevent the screen from closing End Sub End Module[/vbnet] Output: Following is an output in the console where developer can change the font size of the text message, color of the text, background color.

Summary

shape Points

  • In VB.Net comments will represented as 'here write the message.
  • Console programming is easy because it does not have any graphics and easy to develop.
  • To prevent the screen from closing Console.ReadKey() will be useful.