How can I convert the following?
2934 (integer) to B76 (hex)
Let me explain what I am trying to do. I have User IDs in my database that are stored as inte
Use:
int myInt = 2934; string myHex = myInt.ToString("X"); // Gives you hexadecimal int myNewInt = Convert.ToInt32(myHex, 16); // Back to int again.
See How to: Convert Between Hexadecimal Strings and Numeric Types (C# Programming Guide) for more information and examples.