\ Operator
 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 Studio .NET 2003

Divides two numbers and returns an integer result.

```number1 \ number2
```

#### Parts

number1
Required. Any numeric expression of an integral type.
number2
Required. Any numeric expression of an integral type.

#### Supported Types

Byte, Short, Integer, or Long.

#### Result

The result is the integer quotient of number1 and number2, dropping the remainder.

#### Remarks

Before division is performed, any floating-point numeric expressions are coerced to Long if Option Strict is Off. If Option Strict is On, a compiler error results.

The data type of the result is Byte, Short, Integer, or Long. Any fractional portion is truncated.

If any expression is stated as Nothing, it is treated as zero. Attempting to perform integer division by zero causes a DivideByZeroExeception to be thrown.

#### Example

This example uses the \ operator to perform integer division. The result is an integer representing the integer quotient of the two operands.

```Dim myValue As Integer
myValue = 11 \ 4   ' Returns 2.
myValue = 9 \ 3   ' Returns 3.
myValue = 100 \ 3   ' Returns 33.
MyValue = 67 \ -3   ' Returns -22.
```