int Data Type Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello how do C# and VB.Net differ in integer declarations?

ie.. why will this work in C# but not in vb.net

const int WM_CLOSE = 0x0010;

Public Const WM_CLOSE as Integer = 0x0010
 
ie.. why will this work in C# but not in vb.net

Because VB has a different way of writing hex number literals - you
use the &H prefix.

Public Const WM_CLOSE as Integer = &H10



Mattias
 
Back
Top