using System;
public class Program
{
public static void Main()
object o2 = null;
try
int i2 = (int)o2; // Error
}
catch (System.NullReferenceException e)
Console.WriteLine("Catch 1: This cast is not possible");
catch (System.InvalidCastException e)
Console.WriteLine("Catch 2: This cast is not valid");