title: Can I load a .NET assembly at runtime and instantiate a type knowing only the name?
body: <p>Is it possible to instantiate an object at runtime if I only have the DLL name and the class name, without adding a reference to the assembly in the project? The class implements a interface, so once I instantiate the class, I will then cast it to the interface.</p>
  
  <p>Assembly name:</p>
  
  <blockquote>
    <p>library.dll </p>
  </blockquote>
  
  <p>Type name: </p>
  
  <blockquote>
    <p>Company.Project.Classname</p>
  </blockquote>
  
  <hr>
  
  <p><strong>EDIT:</strong> I dont have the absolute path of the DLL, so <code>Assembly.LoadFile</code> won't work. The DLL might be in the application root, system32, or even loaded in the GAC.</p>