VB.NET offers two division operators: / and .The forward slash or right-facing division operator (/) returns a floating-point answer. In other words, this operator allows for a fractional answer; there is no remainder. Thus, if you use this operator to divide 12 by 5 (12/5), the answer is 2.4. This answer is returned as a Double.
The backslash or left-facing division operator () performs integer division; that is, it returns an integer value and discards any remainder. Thus, if you use the integer division operator to divide 12 by 5 (125), the return value is truncated to the integer 2, with VB.NET discarding the remainder of 4. However, no cast is needed (even with Option Strict On) because you've explicitly asked for the integer value.
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment