[Mono-devel-list] [GENERICS] implementing static TypeBuilder.GetMethod (Field, Constructor)

Michal Moskal michal.moskal at gmail.com
Fri Jun 3 03:19:37 EDT 2005


On 6/3/05, Martin Baulig <martin at ximian.com> wrote:
> On Mon, 2005-05-30 at 14:20 +0200, Michal Moskal wrote:
> 
> > There is a static method in the 2.0 .NET reflection API:
> >
> >   MethodInfo TypeBuilder.GetMethod (System.Type t, MethodInfo m)
> >
> > there is no documentation on msdn, so I'll skip the link.
> 
> Hello,
> 
> is this method only in TypeBuilder or also in Type ?  I think if it's
> only in TypeBuilder it's not really that useful at all.

It's static and takes System.Type as parameter. I don't why it's in
TypeBuilder but AFAIK it should work with all System.Types.

> > What it does is take instanciated generic type and a method taken from
> > the non instanciated generic type m. It then returns the same method
> > in t.
> 
> We have some unmanaged API in Mono for that, shouldn't be hard exposing
> it through that function.
> 
> However, you should also be able to implement this entirely in managed
> code, I'll have a look at this next week and send you some sample code.

Great, thanks!

-- 
   Michal Moskal,
   http://nemerle.org/~malekith/



More information about the Mono-devel-list mailing list