Scopri come trovare un fabbro esperto per la tua finestra blindata, migliorando la sicurezza della tua casa. In questo articolo, esploreremo i servizi di ristrutturazione, giardinaggio e progettazione edilizia offerti da Ernesto.it, per garantirti un ambiente sicuro e accogliente.
Trova professionisti vicino a te
Trova professionisti
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace _14_The_Catch
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int x = 0, y = 0;
try
{
x = Convert.ToInt32(textBox1.Text);
y = Convert.ToInt32(textBox2.Text);
MessageBox.Show("x / y = " + (x / y).ToString());
}
catch (DivideByZeroException ex)
{
MessageBox.Show("Divide by Zero Exception");
}
catch (FormatException ex)
{
MessageBox.Show("Format Exception");
}
finally
{
MessageBox.Show("Finally");
}
}
}
}