|
<< Click to Display Table of Contents >> Devolver o erro para função pai |
![]() ![]()
|
using System;
public class Class1
{
public static void Main()
{
int x = 0;
int y = 10;
try
{
int z = y / x;
Console.WriteLine(z);
}
catch(System.DivideByZeroException)
{
Console.WriteLine("Exception disparada");
throw; <-------- aqui
}
}
}