using System;
public class Program
{
public static void Main()
// Store integer 182
int intValue = 234;
// Convert integer 182 as a hex in a string variable
string hexValue = intValue.ToString("X");
// Convert the hex string back to the number
int intAgain = int.Parse(hexValue, System.Globalization.NumberStyles.HexNumber);
Console.WriteLine("0x" + intAgain.ToString("x"));
}