VB.Net

VB.Net Basic Syntax

VB.Net Basic Syntax

A program in the Object-Oriented Programming approach comprises many objects that interact with one another through actions. Methods are the actions that an object can perform. Objects of the same kind are said to be of the same type or, more commonly, in the same class.

A VB.Net code/program is a collection of objects that communicate by invoking each other's methods. Let's take a quick look at what class, object, method, and instance variables mean.

  • Object: Objects have behaviors and states. An object is a class instance.
  • Class: A class is a template that outlines the behaviors/states that objects of its type can support.
  • Method: A method is essentially a behavior. Many methods can be found in a class. Methods are where logic is expressed, data is manipulated, and all actions are carried out.
  • Instance Variables: Each object has a collection of instance variables that are unique to it. The values assigned to these instance variables define an object's state.

Identifiers

A name used to identify a class, variable, function, or any other user-defined item is an identifier. The following are the basic principles for naming classes in VB.Net:

  • A name must begin with a letter and may be followed by a series of letters, digits (0 - 9) or underscore. An identifier's first character cannot be a digit.
  • It must not include any embedded spaces or symbols like as? - +! @ # percent & * () []. ;: "'/ and. An underscore (_) can, however, be utilized.
  • It should not be considered a reserved keyword.

VB.Net Keywords

Below is a list of VB.Net reserved keywords 

Top course recommendations for you

    Mongodb Tutorial
    2 hrs
    Beginner
    20.1K+ Learners
    4.58  (1106)
    Android App with Python
    2 hrs
    Beginner
    30.2K+ Learners
    4.44  (726)
    JavaScript Projects
    2 hrs
    Intermediate
    35.6K+ Learners
    4.52  (1280)
    HTML Attributes and Tags
    2 hrs
    Beginner
    46.5K+ Learners
    4.58  (2499)
    HTML Tutorial
    6 hrs
    Intermediate
    52.4K+ Learners
    4.5  (1226)
    CSS Properties
    2 hrs
    Beginner
    22K+ Learners
    4.51  (948)
    CSS Tutorial
    2 hrs
    Intermediate
    37.7K+ Learners
    4.54  (1794)
    Docker Best Practices
    2 hrs
    Beginner
    6.1K+ Learners
    4.38  (179)
    Docker for Intermediate Level
    3 hrs
    Beginner
    7.1K+ Learners
    4.37  (174)
    Docker Orchestration
    3 hrs
    Intermediate
    3.2K+ Learners
    4.63  (84)