Check out example codes for "Celsius to Fahrenheit c#". It will help you in understanding the concepts better.

Code Example 1

private static void CelsiusToFahrenheit(double celsius)
{
    var fahrenheit = Math.Round((celsius * 1.8) + 32, 2);
  	Console.WriteLine($"{fahrenheit}°F");
}

// CelsiusToFahrenheit(0); output 32°F
// CelsiusToFahrenheit(20); output 68°F
// CelsiusToFahrenheit(30); output 86°F

Learn ReactJs, React Native from akashmittal.com