[Mono-devel-list] Invoke..

Auge Mike tobe_better at hotmail.com
Sun Jan 16 12:12:46 EST 2005


Thank you for your reply. But strange enough! I remember that it did not 
work with me before posting the Q. And now it work with me with a simple 
example. But I think it should! Anyway I will try it again and come back to 
you tommorow!

Thanx again ;)


>From: "Rodrigo B. de Oliveira" <rbo at acm.org>
>To: "'Auge Mike'" 
><tobe_better at hotmail.com>,<mono-devel-list at lists.ximian.com>
>Subject: RE: [Mono-devel-list] Invoke..
>Date: Sun, 16 Jan 2005 12:06:51 -0200
>
>Object[] args = new object[] {}
>foreach (object o in objectList)
>{
>      o.GetType().GetMethod("foo").Invoke(o, args);
>}
>
> > -----Original Message-----
> > From: mono-devel-list-admin at lists.ximian.com
> > [mailto:mono-devel-list-admin at lists.ximian.com] On Behalf Of Auge Mike
> > Sent: Sunday, January 16, 2005 11:15 AM
> > To: mono-devel-list at lists.ximian.com
> > Subject: [Mono-devel-list] Invoke..
> >
> > Hi guys,
> >
> > I have a Q for you. If I have an array of objects, and each
> > object is of different class type. But all the classes
> > implement a method with the same name and sig. Note that the
> > calsses dose no inherit from a shared interface or class.
> > Also the objects are casted to the class "object". How can I
> > invoke the method using the name in each object?
> >
> > Thank you for your help in advance!
> >
> > _________________________________________________________________
> > Express yourself instantly with MSN Messenger! Download today
> > it's FREE!
> > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> >
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
> >
>
>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




More information about the Mono-devel-list mailing list