using System;
public class Example {
public static void Main(string[] args) {
string value;
value = Double.MinValue.ToString();
try {
Console.WriteLine(Double.Parse(value));
}
catch (OverflowException) {
Console.WriteLine("{0} is outside the range of the Double type.",
value);
}
value = Double.MaxValue.ToString();
try {
Console.WriteLine(Double.Parse(value));
}
catch (OverflowException) {
Console.WriteLine("{0} is outside the range of the Double type.",
value);
}
}
}
|