use of boxing and unboxing in c# code example
Example: boxing and unboxing in c#
class BoxingUnboxing
{
static void Main()
{
int myVal = 1;
object obj = myVal; // Boxing
int newVal = (int)obj; // Unboxing
}
}