9
Answers

object' does not contain a definition for 'CreateInstance' ?

Barkha Shukla

Barkha Shukla

10y
1.3k
1
AssemblyName assembly = new AssemblyName();
var myAssembly = Assembly.Load(@"D:\MyLabBeDevelopmet1.0\Test\bin\Debug\MongoDBLogger.dll");
EventNotifier.IEventNotifier eventNotifier = myAssembly.CreateInstance("MongoDBLogger.Logger") as EventNotifier.IEventNotifier;
eventNotifier.Log(FinalXML);
Answers (9)