title: Binary Shift Differences between VB.NET and C#
body: <p>I just found an interesting problem between translating some data:</p>
  
  <p>VB.NET: <code>CByte(4) &lt;&lt; 8</code> Returns 4</p>
  
  <p>But C#: <code>(byte)4 &lt;&lt; 8</code> Returns 1024</p>
  
  <p>Namely, why does VB.NET: <code>(CByte(4) &lt;&lt; 8).GetType()</code> return type <code>{Name = "Byte" FullName = "System.Byte"}</code></p>
  
  <p>Yet C#: <code>((byte)4 &lt;&lt; 8).GetType()</code> returns type <code>{Name = "Int32" FullName = "System.Int32"}</code></p>
  
  <p>Is there a reason why these two treat the binary shift the same? Following from that, is there any way to make the C# bit shift perform the same as VB.NET (to make VB.NET perform like C# you just do <code>CInt(_____) &lt;&lt; 8</code>)?</p>