How tu use int32.tryparse() Method

Hi all, i wanted to know how to use the Int32.TryParse() method to check if a user input is valid and can be converted to a number, the thing is i dont understand the ByRef result As Integer part in the method: Int32.TryParse(s As String, ByRef result As Integer). So if I use int32.TryParse(UserInput, 0) this works but what should normali go in the ByRef result As Integer part, in other words int32.TryParse(UserInput, what goes in here).

Thanks in advance.

Hi,

Unfortunately, expression field in Assign, If condition etc doesn’t support ref or out type argument, for example, as the following. It’s handled as In type argument.

If we need to handle it as ref or out argument, try to use InvokeMethod as the following image.

However, please note It’s not very good readability, i think.

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.