Practice ยท 1 of 4
Parse or default
CHALLENGE
Difficulty: beginner+25 XP
Implement static int ParseOrDefault(string input) โ return the parsed int if input is a valid whole number, otherwise return 0. Empty string and whitespace count as invalid.
Press Submit to check your solution.
Back to lesson: Practice: Parse and validate