O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

DllNotFoundException

Synopsis

This exception indicates that the file specified in a DLL import could not be found (see System.Runtime.InteropServices.DllImportAttribute). This exception is thrown only when you attempt to link against a method declared using the P/Invoke features of .NET. Any managed DLL (such as those produced by C# or Visual Basic .NET) that cannot be found instead generates TypeLoadExceptions when you attempt to resolve types out of an assembly that cannot be found.

public class DllNotFoundException : TypeLoadException {
// Public Constructors
   public method DllNotFoundException();  
   public method DllNotFoundException(string message);  
   public method DllNotFoundException(string message, 
        Exception inner);  
// Protected Constructors
   protected method DllNotFoundException(
        System.Runtime.Serialization.SerializationInfo info, 
        System.Runtime.Serialization.StreamingContext context);  
}

Hierarchy

ObjectException(System.Runtime.Serialization.ISerializable)SystemExceptionTypeLoadExceptionDllNotFoundException

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required