Basic Syntax of Visual Basic .Net

Visual Basic is a very simple programming language which is based on .Net framework. VB.Net is not a case sensitive so that it is easy to code even for beginners just like you are using the English language.

Visual Basic is more easy, simple and powerful than C or C++. Unlike in C or C++, we don’t need to add a semicolon (;) after each statement in VB.Net.

As visual basic is an object-oriented programming language, it consists a variety of objects which interact with each of them. The action occurs with these interactions is called Methods.

Now, before we start the learning of VB.Net, let us meet the concepts of objects, classes, methods and instance variables.

Objects:

An object is an instance of the class. An object is a thing which can be a person, data, mark list or a student or anything else which has states and behaviours.

Classes:

A class  is a template which describes the types or behaviours that objects of its type supports.

Methods:

A method is the behaviour of the class objects. A class contains many methods where the data’s are written such as the logics and actions to be executed.

Instance Variables:

Each class objects has its unique set of instances of which state is created by the values assigned to these instance variables.

Basic Syntax for a Visual Basic Program

Module Module1

  Sub Main()

  End Sub 

End Module
  • Every VB.Net programs are written within in a module. A module is starts with Module and ends on End Module keywords.
  • In Visual Basic the comments are starts with an apostrophe(‘). VB.Net do not support for block comments only the line comments are provided.