I have this as the main class of my dll:

```
namespace PTEmu
{

    public class DatabaseProtocol : IDatabaseProtocol
    {
      (constructors and methods)
    }
 }

```

This code I use to Load the DLL and create an instance of the class

```
var assembly = Assembly.LoadFrom("database\\" + file);
var t = assembly.GetType("PTEmu.DatabaseProtocol");
var protocol = Activator.CreateInstance(t) as IDatabaseProtocol;

```

`Assembly.LoadFrom, assembly.GetType` and `Activator.CreateInstance` itself, doesn't throw any errors.

I can't see what is wrong, sice I took this piece of code from another project that worked fine with it.

If I remove `as IDatabaseProtocol`, it returns an object, but not an object like the interface I want, so I can call the methods easily...