I want to know what is purpose of '\' in vb ? I have this statement:
frontDigitsToKeep \ 2
and I want to convert it to C#.
Please suggest.
The += operator adds the value on its right to the variable or property on its left, and assigns the result to the variable or property on its left.
No, it doesn't exist in VBA.
Visual Basic provides the following types of operators: Arithmetic Operators perform familiar calculations on numeric values, including shifting their bit patterns. Comparison Operators compare two expressions and return a Boolean value representing the result of the comparison.
Concatenates a String expression to a String variable or property and assigns the result to the variable or property.
\
is the integer division operator in VB.NET.
For C#, just use the standard /
operator instead and assign the result to some integer type:
frontDigitsToKeep / 2
You need an integer typecast if frontDigitsToKeep
itself isn't an integer:
(int) frontDigitsToKeep / 2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With