Skip to content

UInt16Extensions.ToBinaryString Method ​

Definition ​

Converts a UInt16 to its binary string representation, for example, "0b0001001000110100".

c#
public static string ToBinaryString(this ushort value);

View source

Parameters ​

NameTypeDescription
valueUInt16

Returns ​

String

An 18-character string prefixed with "0b" followed by 16 binary digits.