ByteExtensions.CopyBitsFrom Method
Definition
Copies bits from one byte to another using a mask.
public static Byte CopyBitsFrom(this Byte input, Byte toCopyFrom, Byte mask);
Parameters
| Name | Type | Description |
|---|---|---|
| input | Byte | The byte to copy bits into. |
| toCopyFrom | Byte | The byte to copy bits from. |
| mask | Byte | A mask specifying which bits to copy. Set bits in the mask indicate positions to copy from toCopyFrom. |
Returns
A new byte with masked bits from toCopyFrom and unmasked bits from input.