Explicit Casting in C#

The following code explains Explicit casting.

using System;
using System.Text;

namespace forgetCode
{

    class program
    {
        public static void Main()
        {
            // Assign an integer and then cast it to an object implictly.
            int value1 = 10;
            object value2 = value1;

            // Explicitly cast to an integer again from the object type.
            int value3 = (int)value2;
            Console.WriteLine(value3);

        }
    }
}


Output:
10