System.IO.Error.GetExceptionForWin32DriveError C# (CSharp) Méthode

GetExceptionForWin32DriveError() private méthode

private GetExceptionForWin32DriveError ( int errorCode, String driveName ) : Exception
errorCode int
driveName String
Résultat Exception
        internal static Exception GetExceptionForWin32DriveError(int errorCode, String driveName)
        {
            switch (errorCode)
            {
                case Interop.Errors.ERROR_PATH_NOT_FOUND:
                case Interop.Errors.ERROR_INVALID_DRIVE:
                    return new DriveNotFoundException(SR.Format(SR.IO_DriveNotFound_Drive, driveName));

                default:
                    return Win32Marshal.GetExceptionForWin32Error(errorCode, driveName);
            }
        }
    }