How I can check if my string only contain numbers?
I don\'t remember. Something like isnumeric?
If you want to use Regex you would have to use something like this:
string regExPattern = @"^[0-9]+$"; System.Text.RegularExpressions.Regex pattern = new System.Text.RegularExpressions.Regex(regExPattern); return pattern.IsMatch(yourString);