The .NET Framework provides a significant number of specific exception classes, all inheriting from the base Exception class. In the .NET Framework documentation, you'll find tables listing all the possible exceptions that might occur when you call any method. For example, Table 12.2, taken from the .NET Framework documentation, makes it easy to determine what might go wrong when calling the File.Open method.
|SecurityException||The caller to this routine does not have sufficient permissions.|
|ArgumentException||The path is empty, contains invalid characters, or contains only whitespace.|