Understanding variables, their types, and their scopes
Variables in any programming language play a vital role and they are used to store any type of information, such as names, contact numbers, ages, and so on. Similarly, VB variables are also used to store information that can be referred to at any place in the application depending upon the scope of the variable.
Different types of variables that can be created are as follows:
- Primitive: These are simple variables such as String, Number, or Boolean.
- Complex variables: These are complex variables used to store data structures, such as Employee or Address.
- Built-in variable: These are variables that are used to get the metadata of the application, such as logged-in user information, page information, application information, and so on.
You can set the default value of a variable using the defaultVariable
property of the variable.
Types are complex variables that define the data type and structure of a...