N
Nick
Consider this
//I want myVar to equal 0x41
int myVar;
int otherVar = GetItsValue; //returns a decimal 65, 65 is 41 in hex
//now i want to do something like this, obviously doesnt work
myVar = otherVar.ToHex(); //which would ideally be myVar = 0x41
//and then i want to pass myVar to a method as hex
MyMethod(someParam,myVar); // function only accepts hex, its an API call
In other words how do I make that otherVar into a hex?
Thanks.
Nick Z.
//I want myVar to equal 0x41
int myVar;
int otherVar = GetItsValue; //returns a decimal 65, 65 is 41 in hex
//now i want to do something like this, obviously doesnt work
myVar = otherVar.ToHex(); //which would ideally be myVar = 0x41
//and then i want to pass myVar to a method as hex
MyMethod(someParam,myVar); // function only accepts hex, its an API call
In other words how do I make that otherVar into a hex?
Thanks.
Nick Z.