Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int ReadInt(string convert)
- {
- bool success = int.TryParse(convert, out int number);
- while (success == false)
- {
- Console.Write("Ошибка конвертации, повторите ввод: ");
- success = int.TryParse(Console.ReadLine(), out number);
- }
- return number;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement