Esempio n. 1
0
        static void Main(string[] args)
        {
            rational a1 = new rational(2);
            rational a2 = new rational(3);

            Console.WriteLine((a1 + a2));;
            Console.Read();
        }
Esempio n. 2
0
        public static int operator +(rational num1, rational num2)
        {
            rational result = new rational(num1.Value + num2.Value);

            return(result.Value);
        }