I have the following line of Java code:
Float.intBitsToFloat(Integer.reverseBytes(dataInputStream.readInt()));
I want to do the same in C# and I have come up with the following code:
BitConverter.ToSingle(BitConverter.GetBytes(binaryReader.ReadInt32()), 0)
This code is incomplete because I can't find any equivalent to Java's Integer.reverseBytes
-Method. How can I translate this into C#?