Applitools.Utils.CommonUtils.ToBytesBE C# (CSharp) Method

ToBytesBE() public static method

Writes the big-endian byte representation of the input value to the target stream.
public static ToBytesBE ( int value, Stream stream ) : void
value int
stream Stream
return void
        public static void ToBytesBE(int value, Stream stream)
        {
            ArgumentGuard.NotNull(stream, nameof(stream));

            value = IPAddress.HostToNetworkOrder(value);
            var bytes = BitConverter.GetBytes(value);
            stream.Write(bytes, 0, bytes.Length);
        }

Same methods

CommonUtils::ToBytesBE ( short value, Stream stream ) : void