Many thanks!
And here I have another question straight away. Suppose my assembly
contains something like this...
class SomeGenericType<T1, T2> {
void SomeMethod(T1 t1, T2 t2) { /* ... */ }
}
Now suppose I have a MethodReference that refers to a specific
instance of this, e.g.
SomeGenericType`2<string,int>::SomeMethod(!0,!1)
Is there an easy way to get the original method?
SomeGenericType`2::SomeMethod(T1,T2)
Thanks again :)
Timwi
On May 6, 2:15 am, Jb Evain <[email protected]> wrote:
> Use GetElementType () and GetElementMethod ().
>
>
>
> On Wednesday, May 5, 2010, Timwi <[email protected]> wrote:
> > Hi,
>
> > I have some code that looks like this ...
>
> > void SomeMethod(TypeReference tr)
> > {
> > if (tr is GenericInstanceType)
> > tr = tr.GetOriginalType();
> > // ... some more code
> > }
>
> > Given that .GetOriginalType() no longer exists, what is the
> > recommended way to do this now? And how for the similar case of a
> > GenericInstanceMethod?
>
> > Thanks!
> > Timwi
>
> > --
> > --
> > mono-cecil
>
> --
> Jb Evain <[email protected]>
>
> --
> --
> mono-cecil
--
--
mono-cecil