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 Project2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void convertTempButton_Click(object sender, EventArgs e)
{
int Fahrenheit;
int Celsius;
try
{
Fahrenheit = int.Parse(temperatureTextBox.Text);
}
catch (Exception ex)
{
MessageBox.Show("Please enter a Numeric Value");
}
Fahrenheit = int.Parse(temperatureTextBox.Text);
Celsius = (Fahrenheit - 32) * 5 / 9;
convertTempLabel.Text = Convert.ToString(Celsius) + " Celsius";
}
}
}