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

Re: Loading method on runtime by Boas

Boas
Wed Mar 22 08:56:25 CST 2006

HI
I'm not quite sure if I understand you right

but isn't InvokeMember the thing that should help?

Re: Loading method on runtime by Sudhee

Sudhee
Wed Mar 22 09:07:27 CST 2006


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

"Boas Enkler" wrote:

> HI
> I'm not quite sure if I understand you right
>
> but isn't InvokeMember the thing that should help?
>

Re: Loading method on runtime by Laura

Laura
Wed Mar 22 09:27:52 CST 2006

Check out the documentation of Delegate class.
It has all you need.

Laura.

"Sudhee" <Sudhee@discussions.microsoft.com> ha scritto nel messaggio
news:1FBAC8A0-EEF2-476E-8225-0EDF10E7A477@microsoft.com...
>
> 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
>
> "Boas Enkler" wrote:
>
>> HI
>> I'm not quite sure if I understand you right
>>
>> but isn't InvokeMember the thing that should help?
>>