Integer Control

Hi all,
i want know how can i check input if user enter string value. I don’t want to enter a string value if it does then messagebox should show “You cannot write string variable”.
I’m using input dialog activity and user has to enter integer value. How can i check this situation?
What is the code of VB?
Thanks.

Hello @yigit.aybey ,

You can refer to the below post.

I tried but there is a error occured in condition side even in original file. The error is => “Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class” (I cannot change the original file). I think difference of version or smt.

Hi @yigit.aybey ,

We Could Check if a String is Numeric using the Below Methods :

yourStringVar.IsNumeric

or

IsNumeric(yourStringVar)

or

yourStringVar.All(Function(x)System.Text.RegularExpressions.Regex.IsMatch(x.ToString,"\d"))

All the methods above return Either a True or False as value

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