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

Popular posts from this blog

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -

angular - DownloadURL return null in below code -