Exercise 1: Handle a `FormatException`
Exercise on handling a FormatException using `Convert.ToDouble`.
We'll cover the following
Problem Statement
Go through the documentation of ToDouble class in System.Format
, you’ll learn that ToDouble
can throw a FormatException
or an OverflowException
.
Your exercise is to convert an expression to a double using:
Convert.ToDouble(...)
and properly handle the FormatException
.
Get hands-on with 1400+ tech skills courses.