Collapse AllExpand All      Code: All Code: Multiple Code: Visual Basic Code: C# Code: Visual C++ Code: F# Code: JScript 
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)
<SerializableAttribute> _
Public Structure Boolean
[SerializableAttribute]
public struct Boolean
[SerializableAttribute]
public value class Boolean
[<Sealed>]
[<SerializableAttribute>]
type Boolean =  struct end
JScript supports the use of structures, but not the declaration of new ones.

The Boolean type exposes the following members.

  NameDescription
Public method EqualsIndicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Public method GetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public method GetTypeGets the Type of the current instance. (Inherited from Object.)
Public method ToStringConverts the value of this instance to its equivalent string representation (either "True" or "False"). (Overrides Object..::..ToString()()()().)
Top
  NameDescription
Public field Static member FalseStringRepresents the Boolean value false as a string. This field is read-only.
Public field Static member TrueStringRepresents the Boolean value true as a string. This field is read-only.
Top

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.