[Mono-list] ldtoken with ByRef, question

Rodrigo Kumpera kumpera at gmail.com
Fri Nov 21 16:58:37 EST 2008


As you have found out ldtoken can only reference types and not type
signatures.

Could you post an example of you test that throws an exception under MS and
not under mono, please?

Thanks,
Rodrigo


On Fri, Nov 21, 2008 at 7:42 PM, DraconisBG <draconisbg at yahoo.com> wrote:

>
> Well I solved it via calling MakeByRef, too bad it doesnt work when run on
> MS.NET:
>
>  if (argtypes[j].IsByRef)
>  {
>    ilgen.Emit(OpCodes.Call, makeByRefType);
>  }
>
> I realized ldtoken cant produce int32&, as ByRef is actually nothing else
> than an address.
>
> The above solution runs on Mono properly. MS.NET throws a
> NotSupportedException, saying that "MakeByRefType" is not supported for the
> class...
> --
> View this message in context:
> http://www.nabble.com/ldtoken-with-ByRef%2C-question-tp20629727p20629989.html
> Sent from the Mono - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20081121/e0e78d9c/attachment.html 


More information about the Mono-list mailing list