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

Stefan Mecke news.mecke at buchert-wf.de
Mon Mar 8 03:49:22 EST 2004

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.

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]);
	} else {
	Console.WriteLine("Little-endian-platform -- doesn't help");

More information about the Mono-devel-list mailing list