Npgsql Api Docs |

# BitString Members

BitString overview

#### Public Static (Shared) Fields

Empty | Represents the empty string.

#### Public Static (Shared) Methods

Parse | Parses a string to produce a BitString. Most formats that can be produced by ToString can be accepted, but hexadecimal can be interpreted with the preceding X' to mark the following characters as being hexadecimal rather than binary.

#### Public Static (Shared) Operators

Addition Operator | Concatenates the operands.
Bitwise And Operator | Performs a logical AND on the two operands.
Bitwise Or Operator | Performs a logcial OR on the two operands.
Equality Operator | Compares the two operands.
Exclusive Or Operator | Perofrms a logical EXCLUSIVE-OR on the two operands
Greater Than Operator | Compares the two operands.
Greater Than Or Equal Operator | Compares the two operands.
Inequality Operator | Compares the two operands.
Left Shift Operator | Left-shifts the string BitString.
Less Than Operator | Compares the two operands.
Less Than Or Equal Operator | Compares the two operands.
Ones Complement Operator | Performs a logical NOT on the operand.
Right Shift Operator | Right-shifts the string BitString.

#### Public Instance Constructors

BitString | Overloaded. Initializes a new instance of the BitString class.

#### Public Instance Properties

Item | Retrieves the value of the bit at the given index.
Length | The length of the string.

#### Public Instance Methods

And | A logical and between this string and another. The two strings must be the same length.
CompareTo | Overloaded. Compares two strings. Strings are compared as strings, so while 0 being less than 1 will mean a comparison between two strings of the same size is the same as treating them as numbers, in the case of two strings of differing lengths the comparison starts at the right-most (most significant) bit, and if all bits of the shorter string are exhausted without finding a comparison, then the larger string is deemed to be greater than the shorter (0010 is greater than 0001 but less than 00100).
Concat | Creats a bitstring by concatenating another onto this one.
Contains | True if there is at least one bit with the value looked for.
CopyTo | Copies the bitstring to an array of bools.
Equals | Overloaded. Returns true if the this string is identical to the argument passed.
GetEnumerator | Returns an enumerator that enumerates through the string.
GetHashCode | Returns a code for use in hashing operations.
GetType (inherited from Object) |
GetTypeCode |
IndexOf | Finds the first instance of a given value
LShift | Shifts the string operand bits to the left, filling with zeros to produce a string of the same length.
Not | A bitstring that is the logical inverse of this one.
Or | A logical or between this string and another. The two strings must be the same length.
RShift | Shifts the string operand bits to the right, filling with zeros to produce a string of the same length.
Substring | Overloaded. Returns a substring of this string.
ToBoolean | Overloaded.
ToByte | Overloaded.
ToByteEnumerable | Interprets the bitstring as a series of octets (bytes) and returns those octets. Fails if the Bitstring does not contain a whole number of octets (its length is not evenly divisible by 8).
ToInt16 | Overloaded.
ToInt16Enumerable | Interprets the bitstring as a series of 16-bit integers and returns those integers. Fails if the Bitstring's length is not evenly divisible by 16.
ToInt32 | Overloaded.
ToInt32Enumerable | Interprets the bitstring as a series of signed 32-bit integers and returns those integers. Fails if the Bitstring's length is not evenly divisible by 32.
ToInt64 | Overloaded.
ToInt64Enumerable | Interprets the bitstring as a series of signed 64-bit integers and returns those integers. Fails if the Bitstring's length is not evenly divisible by 64.
ToSByte | Overloaded.
ToSByteEnumerable | Interprets the bitstring as a series of signed octets (bytes) and returns those octets. Fails if the Bitstring does not contain a whole number of octets (its length is not evenly divisible by 8). This method is not CLS-Compliant and may not be available to languages that cannot handle signed bytes.
ToString | Overloaded. Returns a string representation of the BitString.
ToType |
ToUInt16 | Overloaded.
ToUInt16Enumerable | Interprets the bitstring as a series of unsigned 16-bit integers and returns those integers. Fails if the Bitstring's length is not evenly divisible by 16. This method is not CLS-Compliant and may not be available to languages that cannot handle unsigned integers.
ToUInt32 | Overloaded.
ToUInt32Enumerable | Interprets the bitstring as a series of unsigned 32-bit integers and returns those integers. Fails if the Bitstring's length is not evenly divisible by 32. This method is not CLS-Compliant and may not be available to languages that cannot handle unsigned integers.
ToUInt64 | Overloaded.
ToUInt64Enumerable | Interprets the bitstring as a series of unsigned 64-bit integers and returns those integers. Fails if the Bitstring's length is not evenly divisible by 64. This method is not CLS-Compliant and may not be available to languages that cannot handle unsigned integers.
Xor | A logical xor between this string and another. The two strings must be the same length.

#### See Also

BitString Class | NpgsqlTypes Namespace