K
Ken Varn
I am seeing a discrepancy on how bit shifts work in C# vs. C++. In C++, if
you do a bit shift and it overflows, the bits are lost.
i.e. in C++, -1 << 32 would produce 0. However, in C#, this same expression
yields -1.
Is there anyway to have C# bit shift behave like C++?
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------
you do a bit shift and it overflows, the bits are lost.
i.e. in C++, -1 << 32 would produce 0. However, in C#, this same expression
yields -1.
Is there anyway to have C# bit shift behave like C++?
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------