Barkha Shukla

Barkha Shukla

  • NA
  • 16
  • 6.3k

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

Jan 2 2015 4:56 AM
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)