Check length of string

Hello,

I have to check for phone numbers and a phone number over here must have 11 numbers.
(eg: 01012345678)
How can I can I get an output for the above example to tell me how many numbers are in the string?

@dvn If that String is in a Variable, then you can get the Count of it using Variabe.Count

@dvn -
1 - for String variable - use strNumber.Length
2 - for Int variable - use intNumber.ToString.Length

3 Likes