Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DirectoryNotFoundException Class

The exception that is thrown when part of a file or directory cannot be found.

For a list of all members of this type, see DirectoryNotFoundException Members.

System.Object
   System.Exception
      System.SystemException
         System.IO.IOException
            System.IO.DirectoryNotFoundException

[Visual Basic]
<Serializable>
Public Class DirectoryNotFoundException
   Inherits IOException
[C#]
[Serializable]
public class DirectoryNotFoundException : IOException
[C++]
[Serializable]
public __gc class DirectoryNotFoundException : public IOException
[JScript]
public
   Serializable
class DirectoryNotFoundException extends IOException

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

DirectoryNotFoundException uses the HRESULT COR_E_DIRECTORYNOTFOUND which has the value 0x80070003. Note that DirectoryNotFoundException is also thrown when COM interop programs see the HRESULT STG_E_PATHNOTFOUND, which has the value 0x80030003.

Requirements

Namespace: System.IO

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

Assembly: Mscorlib (in Mscorlib.dll)

See Also

DirectoryNotFoundException Members | System.IO Namespace | Exception | Handling and Throwing Exceptions | Working with I/O | Reading Text from a File | Writing Text to a File

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.