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