All numeric and date data types in Visual Basic contain the ToString method. This method converts the contents of a variable to a string.
In this video tutorial you will learn about Explicit Type Conversion. If Option Strict is set to On and you try to perform anything other than a widening conversion, your code will not compile. Visual Basic has a set of conversion functions to solve this problem. The following situations require a
In this video tutorial you will learn about Named Constants. A named constant is like a variable and cannot be changed by a programming statement while the program is running. It looks like a regular variable declaration except for the following differences:
In this video tutorial you will learn about literals. Literals (also known as constants) are values which are not changing in the programe and have specific types in Visual Basic. Many literals use a suffix character (C-char, D-decimal, R-double, I-integer, L-long, F-single, S-short, !-single) to identify their type.
In this video tutorial you will learn how to set Option Strict. Visual Basic has a configuration option named Option Strict that determines whether certain implicit data type conversions are legal. If you set Option Strict to On, only widening conversions are permitted (such as Integer to Double). If, on the other hand, Option Strict is set to Off, all types of numeric conversions are permitted, with possible loss of data.
In this video tutorial you will learn about Implicit Type Conversion. When one value of a data type is assigned to a variable of another data type is known as an Implicit Type Conversion. Implicit conversion between numeric types must be in a left-to-right direction. A Decimal value can be assigned to a variable of type Single, an Integer can be assigned to a variable of type Double, and so on, as follow:
In this video tutorial you will learn about Grouping with Parentheses.The mathematical expressions can be grouped with parentheses to force some operations to be performed before others.
In this video tutorial you will learn about the operator precedence. Mathematical expressions are evaluated from left to right. When two operators share an operand, the operator with the highest precedence executes first.
In this video tutorial you will learn about Combined Assignment Operators.
In this video tutorial you will learn how to get the current date and time. Your computer system has an internal clock that calculates the current date and time. Visual Basic provides the functions which allow you to retrieve the current date, time, or both from your computer.