NullableTypes Class Library

NullConvert.ToNullableString Method 

Converts the specified String to its NullableString equivalent.

[Visual Basic]
Public Shared Function ToNullableString( _
   ByVal x As String, _
   ByVal conventionalNullValue As String _
) As NullableString
public static NullableString ToNullableString(
   string x,
   string conventionalNullValue


The String value to convert.
The String value that conventionally represent the null value, can be a null reference (Nothing in Visual Basic).

Return Value

Null if x is equals to conventionalNullValue or both are null, otherwise a NullableString constructed from x.


Exception TypeCondition
ArgumentNullExceptionx is a null reference (Nothing in Visual Basic) and conventionalNullValue is not a null reference.

See Also

NullConvert Class | NullableTypes.HelperFunctions Namespace