How to Convert Celsius to Fahrenheit Using C#

In this tutorial, I will teach you how to convert Celsius to Fahrenheit using c#. This method has the ability to calculate how much Fahrenheit in a given Celsius. The program has a function that, you have to put a Celsius in a textbox and click the button to get the Fahrenheit automatically. Let's begin.

Creating Application

Step 1

Open Microsoft Visual Studio 2015 and create a new windows form application in c#. figure 1

Step 2

Add a buttons, two texboxes, and two labels after that do the form just like shown below. figure 2

Step 3

Double click the button and do the following code to convert the Celsius to Fahrenheit.
  2. double celsius = 0;
  3. double Fahrenheit = 0;
  5. celsius = double.Parse(txtCelsuis.Text);
  7. Fahrenheit = (celsius * 9 / 5) + 32;
  9. txtFahrenheit.Text = Fahrenheit.ToString();
The complete source code is included. You can download it and run it on your computer. For any questions about this article. You can contact me @ Email – [email protected] Mobile No. – 09305235027 – TNT Or feel free to comment below.

Add new comment

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
3 + 7 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.