NullableTypes Class Library

NullConvert.ToNullableSingle Method (String, String)

Converts the specified String representation of a number to its NullableSingle equivalent.

[Visual Basic]
Overloads Public Shared Function ToNullableSingle( _
   ByVal x As String, _
   ByVal conventionalNullValue As String _
) As NullableSingle
[C#]
public static NullableSingle ToNullableSingle(
   string x,
   string conventionalNullValue
);

Parameters

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

Return Value

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

Exceptions

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.
OverflowExceptionx value is not conventionalNullValue and Parse caused an overflow on x.

See Also

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