using System;
using System.Data;
public class Program
{
public static void Main()
try
throw new VersionNotFoundException("blah");
}
catch (VersionNotFoundException e)
throw new Exception("blah2", e);
catch (Exception e)when (e.InnerException is VersionNotFoundException e2)
Console.WriteLine(e2.Message);
catch (Exception e)
// VersionNotFoundException gets caught here as an inner exception