Exemplo n.º 1
0
        public static bool operator ==(Farenheit f, Kelvin k)
        {
            Farenheit far = new Farenheit(0);

            far = (Farenheit)k;
            return(far.getCantidad() == (float)f.getCantidad());
        }
Exemplo n.º 2
0
        public static bool operator ==(Farenheit f, Celsius c)
        {
            Farenheit far = new Farenheit(0);

            far = (Farenheit)c;
            return(far.getCantidad() == (float)f.getCantidad());
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            Celsius   c1 = new Celsius(1d);
            Kelvin    k  = new Kelvin(1);
            Farenheit f1 = new Farenheit(1);
            Celsius   c2 = new Celsius(1);

            /*c1 = (Celsius) k;
             * f1 = (Farenheit) c1;*/
            //c1 = (Celsius)k;
            f1 += k;
            Console.WriteLine(f1.getCantidad());
            f1 += k;
            Console.WriteLine(f1.getCantidad());
            Console.ReadLine();
        }
Exemplo n.º 4
0
        public static bool operator ==(Kelvin k, Farenheit f)
        {
            Farenheit far = new Farenheit(0);

            far = (Farenheit)k;
            float aux = (float)far.getCantidad();

            return(aux == (float)f.getCantidad());
        }