Skip to content

ByteExtensions.ToBinaryString Method

Definition

Converts a byte to its binary string representation, e.g. "0b01011010".

public static string ToBinaryString(this Byte value);

View source

Parameters

Name Type Description
value Byte The byte value.

Returns

String

A 10-character string prefixed with "0b" followed by 8 binary digits.