Complex types, such as structures and classes can be serialized into a byte array and then assigned to a variant. Note that you will be responsible for ensuring correct byte ordering when serializing those types.