Get last char (solved)

i have a list of labels named “label50” to label60" and i want to get the last char from the name like “0” or “1” etc,to use it on select case.
if is use the bellow simple code i get “outofboundsexception”

Dim t As Text = newLabel.Name Dim s As Text = t.right(-1)

How i get the last char from the label?
Environment is IOS.

Pass 1, not -1. It is the count of characters from the right. A negative value will get you out of bounds.

Thank you Ulrich,Resolved… :slight_smile:

Dim t As text = x.ToText Dim s As integer s = Integer.FromText(t.right(1))