Skip to content

UInt16Extensions.GetBit Method ​

Definition ​

Gets the value of the bit at the specified index.

c#
public static bool GetBit(this ushort value, int index);

View source

Parameters ​

NameTypeDescription
valueUInt16
indexInt32The zero-based bit index. Must be in the range 0 to 15.

Returns ​

Boolean

true if the bit is set; false otherwise.