Hex help needed

  • Thread starter Thread starter AMP
  • Start date Start date
A

AMP

What datatype is hex in c# ?
I have:
const ????? ACTION_ERASE_CHECK=0x04;
in c i just have:
#define BSL_ECHECK 0x04

Thanks
Mike
 
Hex isn't a datatype. You probably mean byte or int.

If you were in my classroom, I would have answered your question with a
question: "What data type is 0x04 in C?"
 
You could store that in a byte or a short or and int or a long, the most
efficient for storage if a byte but for speed is probably and int as an int
is a word size

HTH

Ciaran O'Donnell
 
AMP said:
What datatype is hex in c# ?
I have:
const ????? ACTION_ERASE_CHECK=0x04;
in c i just have:
#define BSL_ECHECK 0x04

It could be any integer type.

If int in C is 32 bit and you need to have
the same number of bits in C# then you should
use int too.

Arne
 
Back
Top