I am trying to just load a DLL written in C # at runtime and create an instance of the class in this DLL.
Assembly a = Assembly.LoadFrom(@"C:\Development\DaDll.dll"); Type type = a.GetType("FileReleaseHandler", true); TestInterface.INeeedHelp handler = Activator.CreateInstance(type) as TestInterface.INeeedHelp;
No errors occur, and if I go through the code, I can go through the FileReleaseHandler class as it executes the constructor, but the handler value is always null.
What am I missing here? or is there even a better way I should do this?
c #
etoisarobot
source share