In C#
I want to Check the value which is in 8 bit Binary format (i.e. 0000000a or 00010ef0) is between the specific range….
for example
(following is C language code )
int temp=5;
if (temp>=0 || temp<10)
printf("temp is between 0-10");
same way i want to check Hexadecimal value is in Given rage or not ….
int temp=0x5;followed byif (temp >= 0xa || temp < 0x10ef0)looks like what you want.That
||means OR however, you probably want AND (&&).Basically, prefix with
0xto tell the compiler you’re specifying something in hex.