Click or drag to resize
ConvertToBoolean Method (String)
Converts the specified string representation of a logical value to its Boolean equivalent.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static bool ToBoolean(
	string value
)

Parameters

value
Type: SystemString
A string that contains the value of either TrueString or FalseString.

Return Value

Type: Boolean
true if value equals TrueString, or false if value equals FalseString or null.
Exceptions
ExceptionCondition
FormatExceptionvalue is not equal to TrueString or FalseString.
See Also