This code compiles successfully, but causes System.OverflowException in Visual Studio 2013 during execution:
Sub Main()
Dim a As ULong = 14345389830683080345D
Dim c As ULong = 1
Dim x As ULong = a And 1 '<-- cause System.OverflowException
Dim y As ULong = a And c '<-- works well
End Sub
Can you explain me why is this happen? And if a variable has small value (e.g. 5), exception doesn't occur.
P.S. Three most significant bits of a variable are all zeros.