I am developing a weather application in C# using the Google weather XML file and I am having trouble using calculations in a class file. I am trying to convert farenheit to celcius with the folliowing method:
public static class Helper
{
public static decimal CalculateTemp(decimal input)
{
return Math.Round((input - 32) * 5 / 9 / 1.0) * 1.0 + "°C";
}
}
"input" is where the weather data is called such as the highest temp. of today. I am getting the following errors upon compiling:
Error 23: The best overloaded method match for 'Weather.Helper.CalculateTemp(decimal)' has some invalid arguments
Error 24: Argument 1: cannot convert from 'double' to 'decimal'
Error 25 : Operator '/' cannot be applied to operands of type 'decimal' and 'double'
I am not sure how to fix this..