CSharp examples for Custom Type:Box Unbox
Unboxing object to in
using System;//from w w w .j a va 2 s. c om class TestUnboxing { public static void Main() { int myInt = 3422; int yourInt; object obj = myInt; yourInt = (int)obj; Console.WriteLine("Value of yourInt: {0}", yourInt); } }