using System;
namespace Articulos.Cap04.Excepciones.Parte5
{
public sealed class UsoDivideByZeroException
{
public static void Main()
{
int dividendo = 13;
int divisor = 0;
try
{
Console.WriteLine ("{0}/{1}", (dividendo/divisor));
}
catch (DivideByZeroException)
{
Console.WriteLine ("Error: Intento de divisiĆ³n entre cero.");
}
}
}
}
dXNpbmcgU3lzdGVtOwoKbmFtZXNwYWNlIEFydGljdWxvcy5DYXAwNC5FeGNlcGNpb25lcy5QYXJ0ZTUKewogICAgcHVibGljIHNlYWxlZCBjbGFzcyBVc29EaXZpZGVCeVplcm9FeGNlcHRpb24KICAgIHsKICAgICAgICBwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCiAgICAgICAgewogICAgICAgICAgICBpbnQgZGl2aWRlbmRvID0gMTM7CiAgICAgICAgICAgIGludCBkaXZpc29yID0gMDsKICAgICAgICAgICAgCiAgICAgICAgICAgIHRyeQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBDb25zb2xlLldyaXRlTGluZSAoInswfS97MX0iLCAoZGl2aWRlbmRvL2Rpdmlzb3IpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjYXRjaCAoRGl2aWRlQnlaZXJvRXhjZXB0aW9uKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBDb25zb2xlLldyaXRlTGluZSAoIkVycm9yOiBJbnRlbnRvIGRlIGRpdmlzacOzbiBlbnRyZSBjZXJvLiIpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9