Npgsql Api Docs |

# BitString Constructor

#### Overload List

Creates a single-bit element from a boolean value.

> public BitString(bool);

Creates a BitString filled with a given number of true or false values.

> public BitString(bool,int);

> public BitString(0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]);

Creates a bitstring from an integer value. The string will be the shortest required to contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on).

> public BitString(int);

Creats a bitstring from a string. The string to copy from.

> public BitString(string);

Creates a bitstring from an unsigned integer value. The string will be the shortest required to contain the integer (e.g. 1 bit for 0 or 1, 2 for 2 or 3, 3 for 4-7, and so on).

> public BitString(uint);

#### See Also

BitString Class | NpgsqlTypes Namespace