System.Exception is the base exception class. All exceptions in .NET are derived from System.Exception. : Exception in Method « Language Basics « C# / CSharp Tutorial






using System;

public class Starter {
    public static void Main() {
        try {
            int var1 = 5, var2 = 0;
            var1 /= var2;    // exception occurs
        } catch (Exception except) {
            if (except is SystemException) {
                Console.WriteLine("Exception thrown by runtime");
            } else {
                Console.WriteLine("Exception thrown by application");
            }
        }
    }
}








1.21.Exception in Method
1.21.1.An exception can be generated by one method and caught by another
1.21.2.System.Exception is the base exception class. All exceptions in .NET are derived from System.Exception.