int n = 42; // boxing: the value is copied into a heap object object boxed = n; // unboxing: cast it back to the value type int back = (int)boxed; Console.WriteLine($"{boxed} {back}");
wrap a value type in an object