public static void Main()
Exception d1 = new DerivedException();
if( d1 is BaseException )
Console.WriteLine("Base Exception");
if( d1 is DerivedException )
Console.WriteLine("Derived Exception");
public class BaseException : Exception {}
public class DerivedException : BaseException {}