ushort value = 500; ByteVector bv = ByteVector.FromUShort(value);
ushort[] values = { 100, 200, 300 }; ByteVector bv = ByteVector.FromUShort(values);In this example, a ByteVector is created from an array of unsigned short integer values. The resulting ByteVector will be twice the length of the array, with each unsigned short integer value being split into two bytes in little-endian byte order.