Skip to content

Int32Extensions.ToBinaryString Method ​

Definition ​

Converts an int to its binary string representation, for example, "0b00000000000000000000000001011010".

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

View source

Parameters ​

NameTypeDescription
valueInt32

Returns ​

String

A 34-character string prefixed with "0b" followed by 32 binary digits.