Method ToBoolean
ToBoolean()
Converts the value represented by this instance to a boolean.
Declaration
public override bool ToBoolean()
Returns
| Type | Description |
|---|---|
| bool | 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". |