You might check out this, this is useful for you
Demonstrating Boxing and Unboxing - C# Program
using System;
class Boxing
{
public static void main(string[] a)
{
// BOXING
int m = 10;
object om = m; // creates a box to hold m
m = 20;
Console.WriteLine("****** BOXING *****");
Console.WriteLine("m = " + m); // m = 20
Console.WriteLine("om = " +om);// om = 10
Console.ReadLine();
// UNBOXING
int n = 10;
object on = n; // box n (creates a box to hold n)
int x = (int)on; // unbox on back to an int
Console.WriteLine("**** UNBOXING *****");
Console.WriteLine("n = " + n); // n = 20
Console.WriteLine("on = " +on);// on = 10
Console.ReadLine();
}
}