[Mono-list] Problem with DateTime class from C code
Robert Jordan
robertj at gmx.net
Sun Oct 24 08:32:22 EDT 2010
On 23.10.2010 19:18, Fede wrote:
> Hi Robert, thank you for your answer!
>
> I've tried calling the default ctor using mono_runtime_object_init() on the
> DateTime instance but I get an assertion:
>
> ERROR:object.c:95:mono_runtime_object_init: assertion failed: (method)
> Stacktrace:
Yes, my bad. DateTime does not have an explicit default ctor
because it's a value type. Hence the assertion.
Your code is correct as far I can tell from just looking at it.
A small test case of mine also returns the correct string
on both 2-6 and 2-8 Mono versions.
Please post something compilable and don't forget to mention the
Mono version and the platform.
Robert
More information about the Mono-list
mailing list