This is done using the String.Format method. You can use both positive or negative decimal values (that must of course be integers) eg:
int decimalValue = -12345;Console.WriteLine (String.Format("{0:x2}", decimalValue));
HTHTim