Because in VB.NET, the /
operator is defined to return a floating-point result. It widens its inputs to double
and performs the division. In C#, the /
operator performs integer division when both inputs are integers.
See MSDN for VB.NET.
Divides two numbers and returns a floating-point result.
Before division is performed, any integral numeric expressions are widened to Double.
See MSDN for C#.
The division operator (/) divides its first operand by its second. All numeric types have predefined division operators.
When you divide two integers, the result is always an integer.
To get the same semantics in VB.NET as the /
operator on integers in C#, use the \
operator.
Divides two numbers and returns an integer result.