ConversionToDecimal(String, Decimal) Method
Return a number converted to Decimal, with no exception thrown in the
case that the specified value is not valid.
Namespace: HtmlAssembly: Html (in Html.dll) Version: 25.2822.3845
public static decimal ToDecimal(
string value,
decimal defaultValue
)
Public Shared Function ToDecimal (
value As String,
defaultValue As Decimal
) As Decimal
No code example is currently available or this language may not be supported.
- value String
-
Value to convert to a Decimal.
- defaultValue Decimal
-
The default value to return if the value can not be converted.
Decimal
If the caller's value was valid, a Decimal representation of that value.
Otherwise, the caller's specified default value.