PDA

Click to See Complete Forum and Search --> : HEX in c#...


Scott Penner
Apr 9th, 2002, 01:27 PM
Maybe I'm just an idiot, but I had trouble finding this. I hope this saves people some time...

to specify hex in c#:

long MyHexVariable = 0x40;

Cander
Apr 9th, 2002, 01:50 PM
took me a while too..i kept trying &H4..:P too used to VB.

thinktank2
Apr 9th, 2002, 09:17 PM
Well..If you have programmed in C or C++..or even javascript you would already know it by now :)

thinktank2
Apr 9th, 2002, 09:20 PM
to specify in octal

you would prefix a "0"

for example

int x = 023;

Scott Penner
Apr 9th, 2002, 10:51 PM
I guess I never needed hex before in C/C++!?
Oh well, got it now...