Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

Loading method on runtime

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sudhee - 22 Mar 2006 15:01 GMT
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
Boas Enkler - 22 Mar 2006 15:56 GMT
HI
I'm not quite sure if  I understand you right

but isn't InvokeMember the thing that should help?
Sudhee - 22 Mar 2006 16:07 GMT
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

> HI
> I'm not quite sure if  I understand you right
>
> but isn't InvokeMember the thing that should help?
Laura T. - 22 Mar 2006 16:27 GMT
Check out the documentation of Delegate class.
It has all you need.

Laura.

> Hi,
> Sorry I did not put it clearly. I have instatiated the Class 1 , it has
[quoted text clipped - 25 lines]
>>
>> but isn't InvokeMember the thing that should help?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.