Loading method on runtime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am storing method names in one xml file , on run time i read method name
for ex class1.Method1 , I want invoke this method is there any facility in
system.reflection to load the methods like we load assemblies using
assembly.load. I would have instantiated the class before reading xml , Is
there any way I can load method on runtime.
Thanks in Advance
Sudheendra
 
HI
I'm not quite sure if I understand you right

but isn't InvokeMember the thing that should help?
 
Hi,
Sorry I did not put it clearly. I have instatiated the Class 1 , it has let
us say method 1, Method2 . In my application I have xml file which has some
info and methodname like
event TagName="TextName"
type="System.Windows.Forms.KeyPressEventArgs"
valid="Class1.Ischar" .
I read this file run time and get method name ie valid --- class1.ischar to
a string . Now how to use this to invoke method presenlty I am doing like
this
Select case methodname
case "Class1.Ischar"
call Class1.Ischar

I want to avoid this case structure and directly call the method something
like
call <methodname> 'it contains Class1.Ischar
is this possible
thanks in advance
Sudhee
 
Back
Top