samedi 2 janvier 2016

C# checking a whole char for numbers

Hello i got a string that im converting to a char and cheking if it has a digit but i got a bug when i type like 122Abssde it goes thru anny suggestions?

foreach (char cha in myString)
{
    if(char.IsDigit(cha))
    {
       return Int32.Parse(MyString)
    }
}

Aucun commentaire:

Enregistrer un commentaire