using System; class MainClass { public static void Main() { int v = 55; object o = v; // box v into o Console.WriteLine("Value is: {0}", o); int v2 = (int) o; // unbox back to an int } }
Value is: 55