Decimal128TryParse Method |
Converts the string representation of a number to its
Decimal128 equivalent. A return value indicates whether the conversion succeeded or failed.
Namespace:
MongoDB.Bson
Assembly:
MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.16.0+eeafbea0921243a5868b81984e1083a07c1f75bc
Syntax public static bool TryParse(
string s,
out Decimal128 result
)
Public Shared Function TryParse (
s As String,
<OutAttribute> ByRef result As Decimal128
) As Boolean
static member TryParse :
s : string *
result : Decimal128 byref -> bool
Parameters
- s
- Type: SystemString
The string representation of the number to convert. - result
- Type: MongoDB.BsonDecimal128
When this method returns, contains the Decimal128 number that is equivalent to the numeric value contained in s, if the conversion succeeded, or is zero if the conversion failed. The conversion fails if the s parameter is null, is not a number in a valid format, or represents a number less than the min value or greater than the max value. This parameter is passed uninitialized.
Return Value
Type:
Boolean
true if
s was converted successfully; otherwise, false.
See Also