Boolean.Parse Method (String)
.NET Framework (current version)
Converts the specified string representation of a logical value to its Boolean equivalent.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- value
-
Type:
System.String
A string containing the value to convert.
Return Value
Type: System.Booleantrue if value is equivalent to TrueString; false if value is equivalent to FalseString.
| Exception | Condition |
|---|---|
| ArgumentNullException | value is null. |
| FormatException | value is not equivalent to TrueString or FalseString. |
The value parameter, optionally preceded or trailed by white space, must contain either TrueString or FalseString; otherwise, an exception is thrown. The comparison is case-insensitive.
Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Show: