Skip to content

ByteExtensions.SetLowNibble Method ​

Definition ​

Returns a new byte with the low nibble (bits 0-3) set to the specified value.

c#
public static Byte SetLowNibble(this Byte value, Byte nibble);

View source

Parameters ​

NameTypeDescription
valueByteThe byte value.
nibbleByteThe nibble value to set. Only the lower 4 bits are used.

Returns ​

Byte

A new byte with the low nibble replaced.