[Mono-dev] Marshaling DateTime type

Robert Jordan robertj at gmx.net
Wed Oct 15 08:20:11 EDT 2008


FirstName LastName wrote:
> What would be the best equivalent unmanaged type (linux and windows)
> to use if I want to marshal a DateTime in the managed world (.NET,
> mono)?

You can't marshal DateTime directly because its internal representation
is different between runtimes *and* profiles. Use DateTime.Tick (an
int64) or a similar era-based representation.

Robert



More information about the Mono-devel-list mailing list