When using the int32.tryparse(string, int) or integer.tryparse(string, int) method, the integer being returned is always 0.
Example below using the assign activity:
variables:
string a = “838”
bool b
int c
b = int32.tryparse(a, c)
Returned Results:
b = true
c = 0
I have tried changing up the variables to be arguments since arguments have an In and Out feature and still having the same results. Is there anything I am missing here? I am new to Workflow Foundation and UiPath but have developing background.
Thanks @ClaytonM for the response. Yes I agree with you but its better coding practice to use TryParse in regards to error handling. The question is why isn’t the ByRef not working? Do you have the same results when trying the TryParse?
I found this article at Stack Overflow. Seem to be the same issue in regards to Workflow Foundation. Arguments should seem to resolve this issue though.
@ClaytonM, I was able to solve this by using the Invoke Method as mentioned in the Stack Overflow link above. I need to take a deeper dive into Workflow Foundation to understand why ByRef values have reference issues.