NullableTypes Class Library

NullConvert.ToNullableBoolean Method (String, String)

Converts the specified String representation of a logical value to its NullableBoolean equivalent.

[Visual Basic]
Overloads Public Shared Function ToNullableBoolean( _
   ByVal x As String, _
   ByVal conventionalNullValue As String _
) As NullableBoolean
public static NullableBoolean ToNullableBoolean(
   string x,
   string conventionalNullValue


The String value to convert.
The String value that conventionally represent the null value.

Return Value

Null if x is equals to conventionalNullValue otherwise a NullableBoolean constructed parsing x.


Exception TypeCondition
ArgumentNullExceptionx is a null reference (Nothing in Visual Basic) and conventionalNullValue is not a null reference.
FormatExceptionx value is not conventionalNullValue and Parse failed on x.

See Also

NullConvert Class | NullableTypes.HelperFunctions Namespace | NullConvert.ToNullableBoolean Overload List