Hey,
On 1/18/08, Olg <[EMAIL PROTECTED]> wrote:
> GenericInstanceType collectionOfClass = new
> GenericInstanceType(module.Import(typeof(System.Collections.ObjectModel.Collection<>)));
> collectionOfClass.GenericArguments.Add(ClassFactory.GetInterfaceDefinition(c,
> _tr, module));
> --------
> contains = new MethodReference("Contains", collectionOfClass,
> module.Import(typeof(bool)), true, false,
> MethodCallingConvention.Default);
> contains.Parameters.Add(new
> ParameterDefinition(ClassFactory.GetInterfaceDefinition(c, _tr,
> module)));
That one is the correct one, but I think the type of the parameter
should be a GenericParameter picked from the TypeDefinition you
construct the GenericInstanceType with.
--
Jb Evain <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---