VB.net Operator '\' in C# #4983
Replies: 2 comments 4 replies
-
In csharp we have the using System;
Console.WriteLine(501 / 2);
Console.WriteLine((int)123.45 / 1); |
Beta Was this translation helpful? Give feedback.
-
I don't think it's necessary for C# to add a second operator here. The only reason VB.NET has both IMO, I don't like the behavior of the VB.NET |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
There is no VB.net equivalent of '' oprator. We were in the process of moving our codebase from vb.net to C# and we could not find '' operator in C#. In very many places of the project, we have extensively used operator '' for computation.
There is a workaround solution in C# but that is not helping out since this operator is used in many places of the project.
Divides one operand by another and returns an integer result. The division of two numbers returns an integer value. (Decimal part dropped). Example...
a) 123.45 \ 1 will result in 123
b) 501 \ 2 will result in 250
Beta Was this translation helpful? Give feedback.
All reactions