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

Bernie Solomon bernard at ugsolutions.com
Mon Mar 8 12:04:22 EST 2004


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




More information about the Mono-devel-list mailing list