[Mono-devel-list] BitConverter on big-endian-Systems (xScale?)

Robert Shade rshade at dvsconsulting.com
Mon Mar 8 20:41:33 EST 2004


On OS X that test outputs:

                  argument                    byte array
                  --------                    ----------
         0.111111111111111       3F-BC-71-C7-1C-71-C7-1C
                 0.1111111                   3D-E3-8E-39
       1111111111111111111       0F-6B-75-AB-2B-C4-71-C7
                1111111111                   42-3A-35-C7
                     11111                         2B-67
                         *                         00-2A
                      True                            01

Looks platform endian to me.  Anyone have rotor installed on PPC to  
compare?

rob

On Mar 8, 2004, at 12:04 PM, Bernie Solomon wrote:

> The example at:
>
> http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/system/c/bitconverter/ 
> bitconverter.aspx
>
> and the comments at
>
> http://weblogs.asp.net/bclteam/archive/2003/11/06/49730.aspx
>
> seem to imply it should just work as little endian and
> not platform endian.
>
> Bernie Solomon
> ----- Original Message -----
> From: "Steinar Herland" <steinar.herland at gecko.no>
> To: "Stefan Mecke" <news.mecke at buchert-wf.de>;
> <mono-devel-list at lists.ximian.com>
> Sent: Monday, March 08, 2004 2:12 AM
> Subject: RE: [Mono-devel-list] BitConverter on big-endian-Systems  
> (xScale?)
>
>
> Hi,
>
> My Qtec 2020 gives "Little-endian-platform" (Its running on an Intel
> Cotulla 400 MHz cpu)
>
> Best regards
>
> -----Original Message-----
> From: mono-devel-list-admin at lists.ximian.com
> [mailto:mono-devel-list-admin at lists.ximian.com] On Behalf Of Stefan
> Mecke
> Sent: 8. mars 2004 09:49
> To: mono-devel-list at lists.ximian.com
> Subject: [Mono-devel-list] BitConverter on big-endian-Systems (xScale?)
>
> Hi all!
>
> Could anyone please verify and post the behavior with MS.NET compact
> framework on a big-endian system? I think xScale should be one.
>
> Thanks
> Stefan Mecke
>
> --------------------------------------------------------
> using System;
>
>   public class Test
>   {
>      public static void Main(string[] args)
>      {
>         if (!BitConverter.IsLittleEndian){
>              byte[] ba;
>              int i4 = 45555;
>
>              ba = BitConverter.GetBytes(i4);
>
>              for (int i=0; i<ba.Length; i++)
>              {
>                 Console.Write(" {0:x}", ba[i]);
>              }
>              Console.WriteLine();
> } else {
> Console.WriteLine("Little-endian-platform -- doesn't help");
> }
>      }
>   }
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
> _______________________________________________
> 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