S
Stefan Mecke
Hi all!
Could anyone please verify and post the behavior with MS.NET compact
framework on a big-endian system? The docs I found are not precise about
whether BitConverter always returns the platforms native endianness or
always little-endian like x86.
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);
}
Console.WriteLine();
} else {
Console.WriteLine("Little-endian-platform -- doesn't help");
}
}
}
Could anyone please verify and post the behavior with MS.NET compact
framework on a big-endian system? The docs I found are not precise about
whether BitConverter always returns the platforms native endianness or
always little-endian like x86.
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);
}
Console.WriteLine();
} else {
Console.WriteLine("Little-endian-platform -- doesn't help");
}
}
}