In a C# application, int data type variable has been assigned with value 0x200. I didn't understand what kind of format it is. Also, if I try to write same statement in vb.net it gives me an error. Pls help
3 Answers
0x means the following value (in this case 200) is in HEX. 200 Hex is equal to 512 decimal
In C#
int i=0x200;
is equivalent to
int i=512;
In VB.net this can be written as
Dim x=512
OR
Dim x = &H200
Comments
For code conversion I recommend something like developerFusion Code Converter, it is great for putting a code snippet/example you find on the web in C# and having it convert to VB.NET. It will also convert from VB.NET to C#, as well as support for converting Python or Ruby (the .NET implementations of those being IronPython and IronRuby).
&H200