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
    25.4K+ Learners
    4.54  (2288)
    Android App with Python
    2 hrs
    Beginner
    33.9K+ Learners
    4.41  (917)
    JavaScript Projects
    2 hrs
    Intermediate
    42.9K+ Learners
    4.49  (1931)
    HTML Attributes and Tags
    2 hrs
    Beginner
    52.7K+ Learners
    4.53  (3206)
    HTML Tutorial
    6 hrs
    Intermediate
    68.5K+ Learners
    4.54  (4031)
    CSS Properties
    2 hrs
    Beginner
    25.6K+ Learners
    4.46  (1322)
    CSS Tutorial
    2 hrs
    Intermediate
    44.2K+ Learners
    4.52  (2683)
    Docker Best Practices
    2 hrs
    Beginner
    7.1K+ Learners
    4.4  (276)
    Docker for Intermediate Level
    3 hrs
    Beginner
    8.1K+ Learners
    4.39  (252)
    Docker Orchestration
    3 hrs
    Intermediate
    3.9K+ Learners
    4.58  (120)