Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static bool soloNumeros(string dato)
- {
- char[] Numerico = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.' };
- char[] Captura;
- bool salida = false ;
- Captura = dato.ToArray();
- for (int i = 0; i < Captura.Length; i++)
- {
- salida = false;
- for (int j = 0; j < Numerico.Length; j++)
- {
- if (Captura[i] == Numerico[j])
- {
- salida = true; break;
- }
- }
- if (!salida)
- {
- return salida;
- }
- }
- return salida;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement