Sorry JB, was writing the last mail while you were writing yours ;-)

I agree that Resolving these Methods doesnt make sense, special casing at
the call site is the way to go.
Thanks.

On Mon, Oct 25, 2010 at 10:25 AM, Johannes Rudolph <
[email protected]> wrote:

> Small addition: The methods in question are generated by the VES in
> accordance with ECMA 335 Partition II section 14.2.
> What could we do to support the Metadata generated for accessing these
> methods?
>
> On 25 Okt., 10:08, Johannes Rudolph <[email protected]>
> wrote:
> > I have a piece of IL that I want to process with Cecil that looks like
> this:
> >
> > L_0000: ldc.i4.2
> > L_0001: ldc.i4.2
> > L_0002: newobj instance void int32[0...,0...]::.ctor(int32, int32)
> >
> > I can create a MethodReference from the third instruction just fine, the
> > declaring type is int[,]. My basic problem is that I want to check
> whether
> > the referenced method is a constructor or not. For this purpose I'm doing
> > MethodReference.Resolve() and then check IsConstructor.
> >
> > What happens during resolution is that Cecil tries to resolve this ctor
> on
> > int32 (the arrays element type), where it cannot find it. The runtime
> must
> > have some kind of special handling here, and I feel Cecil should do the
> same
> > but I am open to other suggestions.
> >
> > Regards,
> > Johannes
>
> --
> --
> mono-cecil

-- 
--
mono-cecil

Reply via email to