Boolean Structure

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Represents a Boolean value.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public value class Boolean

The Boolean type exposes the following members.

Public methodEqualsIndicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringConverts the value of this instance to its equivalent string representation (either "True" or "False"). (Overrides Object..::..ToString()()()().)

Public fieldStatic memberFalseStringRepresents the Boolean value false as a string. This field is read-only.
Public fieldStatic memberTrueStringRepresents the Boolean value true as a string. This field is read-only.

Instances of this type have values of either true or false.

All members of this type are thread safe. Members that appear to modify instance state actually return a new instance initialized with the new value. As with any other type, reading and writing to a shared variable that contains an instance of this type must be protected by a lock to guarantee thread safety.