|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
* Operator (Visual Basic)
Multiplies two numbers.
The data type of the result depends on the types of the operands. The following table shows how the data type of the result is determined.
Operand data types
Result data type
A numeric data type appropriate for the data types of number1 and number2. See the "Integer Arithmetic" tables in Data Types of Operator Results.
Both expressions are Decimal
Both expressions are Single
Either expression is a floating-point data type (Single or Double) but not both Single (note Decimal is not a floating-point data type)
If an expression evaluates to Nothing, it is treated as zero.
The * operator can be overloaded, which means that a class or structure can redefine its behavior when an operand has the type of that class or structure. If your code uses this operator on such a class or structure, be sure you understand its redefined behavior. For more information, see Operator Procedures.