Converts a string to a bool equivalent.
- s
- The string to convert.
The bool equivalent of s.
Type Reason ArgumentNullException s is a null reference. FormatException s does not represent a bool value.
This method removes leading and trailing white space. After this trimming, valid strings are "1" and "true", which return true, and "0" and "false", which return false.
Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0