Optimising Method Calls on Dynamic Type
问题 I have the following code that instantiates a registered COM object private dynamic server = null // Global variable. ... Type type = Type.GetTypeFromProgID("Svr.GrpCall"); this.server = Activator.CreateInstance(type); I can invoke methods from this COM/ dynamic object just fine using very intuitive notation string expectedResult = this.server.GroupInit(someString, someBoolean); For single calls the performance of calling such methods through the Dynamic Language Runtime (DLR) is liveable.