Boolean Summary The wrapper class for the bool primitive type. Description System.Boolean is the wrapper class for the bool primitive type. Booleans can have one of two possible values: true or false. Examples Instantiation 123import System; System.Boolean myBoolean = new System.Boolean(true); Auto-boxing 123import System; System.Boolean myBoolean = true; Primitives Only 12bool a = true;bool b = false; Methods Boolean (Constructor)Constructs a System.Boolean object. compareCompares the Boolean object to another Boolean object. FALSEThe primitive Boolean value false. fromStringConverts a string to a bool value. fromStringOrConverts a string to its equivalent bool value or the provided default value if the conversion fails. fromStringOrThrowConverts a string to a valid bool value or throws an exception if the value cannot be converted. toExternalConverts the Boolean value to its equivalent external value. toStringReturns a string representation of the Boolean value. TRUEThe primitive Boolean value true. valueOfReturns the primitive Boolean value wrapped by the System.Boolean object. Share HTML | BBCode | Direct Link