[Mono-dev] Are there any endian issues with unsafe code?

Kornél Pál kornelpal at hotmail.com
Tue Nov 8 13:50:08 EST 2005


Hi,

Thanks for the test results. After the message of Brion Vibber I expected
these results but now I'm sure.

> BTW, BinaryReader/Writer is always little-endian. This is documented
> on MSDN.

They are expected to be little-endian but only BinaryReader.ReadUInt16 (no
other BinaryReader or any BinaryWriter methods) is documented to be
little-endian.:)

Kornél

----- Original Message -----
From: "Robert Jordan" <robertj at gmx.net>
To: <mono-devel-list at lists.ximian.com>
Sent: Tuesday, November 08, 2005 4:41 PM
Subject: Re: [Mono-dev] Are there any endian issues with unsafe code?


> Kornél Pál wrote:
>> Hi,
>>
>> Could you please run the attached test case with Mono on a big-endian
>> system
>> and share the results with me to get to know the exact details of managed
>> endiannes.
>>
>
> BTW, BinaryReader/Writer is always little-endian. This is documented
> on MSDN.
>
> BinaryReader.ReadInt32: little-endian
> Bitmap.LockBits:        big-endian
> Buffer.BlockCopy:       big-endian
> LayoutKind.Explicit:    big-endian
> Marshal.Copy:           big-endian
> Marshal.WriteByte:      big-endian
> Unsafe code:            big-endian
>
> Robert
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>




More information about the Mono-devel-list mailing list