c# - Performance of Invokemethod -
void executemethodviareflection(testobj comm) { var paramnames = comm.paramnames; //of type string array var paramdata = comm.data; //of type object array type t = this.gettype(); t.invokemember(comm.method, bindingflags.invokemethod, null, this, paramdata, null, null, paramnames); } i use above method invoke method using reflection. call same method multiple times. performance of not great when compared normal method invocation. there better way can improve performance.
Comments
Post a Comment