Avalon.Utility.Conversions.Misc.ToBigEndian C# (CSharp) Method

ToBigEndian() public static method

public static ToBigEndian ( uint source ) : uint
source uint
return uint
        public static uint ToBigEndian(uint source)
        {
            if (BitConverter.IsLittleEndian)
            {
                return (uint)(source >> 24) |
                             ((source << 8) & 0x00FF0000) |
                             ((source >> 8) & 0x0000FF00) |
                              (source << 24);
            }
            return source;
        }