public static void Main(string[] args) { Far degr1 = new Far(); Sensor c1 = new Sensor("Фаренгейту"); Console.WriteLine("температура по {1} равна {0}", c1.Exp(degr1), c1.ToString()); Cels degr2 = new Cels(); Itemp be2 = new Adapter(degr2); Console.WriteLine("температура по Цельсию равна {0}", c1.Exp(be2), c1.ToString()); Console.ReadKey(); }
public Adapter(Cels t2) { t1 = t2; }