[Mono-list] Embedded API: calling explicit operators

jonathan at mugginsoft.com jonathan at mugginsoft.com
Sat Aug 31 21:16:35 UTC 2013

How is an explicit operator called using the embedded api?

For example mscorlib contains a number of explicit operators for NSDecimal:

Reflection returns the operators as methods which I naively attempt to call like so in Obj-C:

    - (uint8_t)op_Explicit_withValue:(NSDecimalNumber *)p1
		MonoObject *monoObject = [self invokeMonoMethod:"op_Explicit(decimal)" withNumArgs:1, [p1 monoValue]];
		return DB_UNBOX_UINT8(monoObject);

However all the operator methods will have the same signature as only the return type differs, so how do I differentiate them? 



More information about the Mono-list mailing list