How do I initialize an int with a hexadecimal value?

786 Views Asked by At

i want to input public int a=004DF73C;

but it is showing an error of ';' expected (CS1002)

1

There are 1 best solutions below

2
Junior On BEST ANSWER

You need to add 0x at the front to signify it is a hex format.

public int a = 0x4DF73C;