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
    26.1K+ Learners
    4.53  (2530)
    Android App with Python
    2 hrs
    Beginner
    34.2K+ Learners
    4.41  (955)
    JavaScript Projects
    2 hrs
    Intermediate
    43.6K+ Learners
    4.48  (2112)
    HTML Attributes and Tags
    2 hrs
    Beginner
    53.2K+ Learners
    4.52  (3292)
    HTML Tutorial
    6 hrs
    Intermediate
    69.9K+ Learners
    4.55  (4327)
    CSS Properties
    2 hrs
    Beginner
    25.9K+ Learners
    4.46  (1398)
    CSS Tutorial
    2 hrs
    Intermediate
    44.8K+ Learners
    4.51  (2893)
    Docker Best Practices
    2 hrs
    Beginner
    7.2K+ Learners
    4.45  (331)
    Docker for Intermediate Level
    3 hrs
    Beginner
    8.2K+ Learners
    4.41  (281)
    Docker Orchestration
    3 hrs
    Intermediate
    4K+ Learners
    4.57  (148)