[Mono-list] Troubling passing DateTime via embedded API

jonathan at mugginsoft.com jonathan at mugginsoft.com
Fri Jul 26 17:45:59 UTC 2013

On 26 Jul 2013, at 14:24, jonathan at mugginsoft.com wrote:

> Will try and figure out what is going on with the tick count.
> The tick count looks okay on the C side as far as I can see.
> So perhaps the invocation code is at fault here:

My comprehension was at fault. DateTime is a value type and I wasn't unboxing it prior to invoking the property:

- (void)setDate:(NSDate *)value
    MonoObject *monoObject = [value monoDateTime];
    // [self setProperty:"Date" valueObject:monoObject]; // BAD
    [self setProperty:"Date" valueObject:(MonoObject *)mono_object_unbox(monoObject)];


More information about the Mono-list mailing list