DriveNotFoundException Class

The exception that is thrown when trying to access a drive or share that is not available.

Syntax

Declaration

[Serializable]
[ComVisible(true)]
public class DriveNotFoundException : IOException, ISerializable, _Exception

Inheritance Hierarchy

Constructors summary

Initializes a new instance of the DriveNotFoundException class with its message string set to a system-supplied message and its HRESULT set to COR_E_DIRECTORYNOTFOUND.

Initializes a new instance of the DriveNotFoundException class with the specified message string and the HRESULT set to COR_E_DIRECTORYNOTFOUND.

Initializes a new instance of the DriveNotFoundException class with the specified error message and a reference to the inner exception that is the cause of this exception.

Constructors

  • DriveNotFoundException()

    Initializes a new instance of the DriveNotFoundException class with its message string set to a system-supplied message and its HRESULT set to COR_E_DIRECTORYNOTFOUND.

    public DriveNotFoundException()
  • DriveNotFoundException(String)

    Initializes a new instance of the DriveNotFoundException class with the specified message string and the HRESULT set to COR_E_DIRECTORYNOTFOUND.

    public DriveNotFoundException(string message)

    Parameters

    • message

      A String object that describes the error. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

  • DriveNotFoundException(String, Exception)

    Initializes a new instance of the DriveNotFoundException class with the specified error message and a reference to the inner exception that is the cause of this exception.

    public DriveNotFoundException(string message, Exception innerException)

    Parameters

    • message

      The error message that explains the reason for the exception.

    • innerException

      The exception that is the cause of the current exception. If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

Details

Namespace

System.IO

Assembly

System.IO.FileSystem.DriveInfo.dll

See Also