Hey Jan,
On Tue, Apr 20, 2010 at 9:36 AM, Jan <[email protected]> wrote:
> Hi,
> I have two classes and I would like to call a generic method of a
> generic base class in the context of a derived class:
>
> class BaseClass<T>
> {
> public T GetKey()
> }
>
> class DerivedClass: BassClass<Int>
> {
> }
>
> Now I want to generate ilProcessor.Create(OpCodes.Call,
> CreateMethodRef(typeof(DerivedClass),"GetKey"));
Why don't do you something like:
MethodInfo get_key_info = typeof (DerivedClass).GetMethod ("GetKey");
MethodRef get_key_ref = module.Import (get_key_info);
And pass it to the call (you should do a callvirt) ?
--
Jb Evain <[email protected]>
--
--
mono-cecil
Subscription settings: http://groups.google.com/group/mono-cecil/subscribe?hl=en