CIL and JVM Little endian to big endian in c# and java <p>I am using on the client C# where I am converting double values to byte array.</p> <p>I am using java on the server and I am using writeDouble and readDouble to convert double values to byte arrays.</p> <p>The problem is the double values from java at the end are not the double values at the begin giving to c# </p> <p>writeDouble in Java Converts the double argument to a long using the doubleToLongBits method , and then writes that long value to the underlying output stream as an 8-byte quantity, high byte first.</p> <p>DoubleToLongBits Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout.</p> <p>The Program on the server is waiting of 64-102-112-0-0-0-0-0 from C# to convert it to 1700.0 but he si becoming 0000014415464 from c# after c# converted 1700.0</p> <p>this is my code in c#:</p> <pre><code> class User { double workingStatus; public void persist() { byte[] dataByte; using (MemoryStream ms = new MemoryStream()) { using (BinaryWriter bw = new BinaryWriter(ms)) { bw.Write(workingStatus); bw.Flush(); bw.Close(); } dataByte = ms.ToArray(); for (int j = 0; j &lt; dataByte.Length; j++) { Console.Write(dataByte[j]); } } public double WorkingStatus { get { return workingStatus; } set { workingStatus = value; } } } class Test { static void Main() { User user = new User(); user.WorkingStatus = 1700.0; user.persist(); } </code></pre> <p>thank you for the help.</p>