Method ToBoolean
ToBoolean()
Converts the value represented by this instance to a boolean.
Declaration
public override bool ToBoolean()
Returns
Type | Description |
---|---|
Boolean | true if value equals "true", or false if
value equals false . The comparison is case-insensitive and
ignores leading and trailing whitespace.
|
Overrides
Remarks
This method performs the same conversion as
ToBoolean(String).
Exceptions
Type | Condition |
---|---|
FormatException | The value is neither "true" or "false". |