How to convert visual basic operator \ in C# ?
I mean which is the analog of \ in C#?
Dim r As Integer
r = x - (5 + (x + 1) \ 6)
Thanks!
Integer division is carried out using the \ Operator. Integer division
returns the quotient, that is, the integer that represents the number
of times the divisor can divide into the dividend without
consideration of any remainder. Both the divisor and the dividend must
be integral types (SByte, Byte, Short, UShort, Integer, UInteger,
Long, and ULong) for this operator. All other types must be converted
to an integral type first. The following example demonstrates integer
division.VB Dim k As Integer k = 23 \ 5 ‘ The preceding statement sets k to 4.
Just use the regular division operator
/with an integer variable.