Как удалить ошибку?
Я объявил делегат, используя integer и методы, использующие double, и я получаю ошибку в основном методе, где я создал экземпляр объекта делегата.
Что я уже пробовал:
class Program { //creating a delegate Converter delegate int Converter(int value); //method to calculate Fahrenheit to Celsius static double ToCel(int fah) { return (fah - 32) / 1.8; } //method to callculate Celsius to Fahrenheit static double ToFah(int celsius) { return celsius * 1.8 + 32; } //the method to calculate Celsius to Kelvin static double ToKel(int celsius2) { return celsius2 + 273.15; } //the method to calculate celsius to Rankine static double ToRank(int celsius3) { return (celsius3 + 273.15) * 1.8; } static void Main(string[] args) { //institiating object for delegate Converter process = ToCel; Converter process1 = ToCel; Converter process2 = ToKel; Converter process3 = ToKel; } }