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

Steinar Herland steinar.herland at gecko.no
Mon Mar 8 05:12:54 EST 2004


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





More information about the Mono-devel-list mailing list