Skip to content

ByteExtensions.SetBit Method

Definition

Returns a new byte with the bit at the specified index set.

public static Byte SetBit(this Byte value, int index);

View source

Parameters

Name Type Description
value Byte The byte value.
index Int32 The zero-based bit index to set.

Returns

Byte

A new byte with the specified bit set.