Microsoft.Protocols.TestSuites.SharedAdapter.LittleEndianBitConverter.ConvertToBytes C# (CSharp) Method

ConvertToBytes() private static method

This method is used to convert the specified value to the buffer.
private static ConvertToBytes ( ulong value, byte buffer ) : void
value ulong Specify the value to convert.
buffer byte Specify the buffer which copies the bytes into.
return void
        private static void ConvertToBytes(ulong value, byte[] buffer)
        {
            for (int i = 0; i < buffer.Length; i++)
            {
                buffer[i] = unchecked((byte)(value & 0xff));
                value = value >> 8;
            }
        }