MoneyTryParse(String, Money) Method

Converts the String representation of a number to its Money equivalent. A return value indicates whether the conversion succeeded or failed.

Definition

Namespace: InnerDrive.Financial
Assembly: InnerDrive.Financial (in InnerDrive.Financial.dll) Version: 5.2.9017.0
C#
public static bool TryParse(
	string? s,
	out Money? result
)

Parameters

s  String
A String object containing a number to convert.
result  Money
When this method returns, contains a Money equivalent to the numeric value or symbol contained in s, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the s parameter is a null reference, is not a number in a valid format, or represents a number less than MinValue or greater than MaxValue. This parameter is passed uninitialized.

Return Value

Boolean
true if s was converted successfully; otherwise; false.

Remarks

result will be returned denominated in U.S. dollars. If s is denominated in a different currency, the method may fail.

See Also