TryParseCurrency(Value: String; Var Result: Currency): Boolean;
The TryParseCurrency method checks if the specified value can be converted into the currency type according to regional standard settings.
If conversion is possible, the Result variable will contain the conversion result and the method returns True, otherwise False.
Sub UserProc;
Var
CI: ICultureInfo;
B: Boolean;
Cur: Currency;
Begin
CI := CultureInfo.Current;
B := CI.TryParseCurrency("1234,56789", Cur);
End Sub UserProc;
After executing the example the Cur variable will contain the 1234.5679 value, and the B variable will contain the attribute of a successful conversion.
See also: