Creates a new DirectoryNotFoundException with its message string set to message and inner and its HRESULT set to COR_E_DIRECTORYNOTFOUND.
[Visual Basic] Overloads Public Sub New( _ ByVal message As String, _ ByVal inner As Exception _ ) [C#] public DirectoryNotFoundException( string message, Exception inner ); [C++] public: DirectoryNotFoundException( String* message, Exception* inner ); [JScript] public function DirectoryNotFoundException( message : String, inner : Exception );
When handling exceptions, it is sometimes desirable to throw another exception that is more indicative of the error that has occurred. To avoid losing the original exception and the information that it carries, exceptions can hold a reference to another exception.
DirectoryNotFoundException Class | DirectoryNotFoundException Members | System.IO Namespace | DirectoryNotFoundException Constructor Overload List