L
L
libera2016-03-16 18:16:35
WPF
libera, 2016-03-16 18:16:35

Limit in textbox max number?

Tell me how to do it, so that you can only drive up to n numbers.
if (!char.IsDigit(e.Text, 0)) e.Handled = true;
I limited the output to only numbers, but I also need to limit it from 0 to 20.
To be able to drive only from 0-20

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Eremin, 2016-03-16
@EreminD

Sorry, why not use NumericUpDown?
Accepts only numbers as input and you can set min/max values

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question