Good Day.
What is the meaning of “0” in “Double.TryParse(InputValue, 0)”? Does “0” mean true?
Thank you.
Best regards,
Robert Monsalud
Good Day.
What is the meaning of “0” in “Double.TryParse(InputValue, 0)”? Does “0” mean true?
Thank you.
Best regards,
Robert Monsalud
Hi,
According to official document, definition of Double.TryParse is the following.
Public Shared Function TryParse (s As String, ByRef result As Double) As Boolean
So, 2nd argument is ref type result. This means if input string can be parsed to double value, the result value is set to the result variable, originally.
However, unfortunately, Assign activity doesn’t support ByRef type argument. So we can set it any double type instance or variable.(But it doesn’t set result) For example, the following works.
Double.TryParse(InputValue, New Double)
Double.TryParse(InputValue, Nothing)
Double.TryParse(InputValue, 0)
Double.TryParse(InputValue, d)
d is Double variable
If we need to get result value from Double.TryParse, we can use Invoke Method activity.
The following is a sample to use Double.TryParse with Assign and InvokeMethod
Hope this helps you.
Regards,
Thank you for the detailed explanation. Appreciate it.
Best regards,
Robert Monsalud
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.