Example #1
0
File: Demo1.cs Project: 845289/c-
        public static Demo1 operator -(Demo1 x, Demo1 y)
        {
            Demo1 t = new Demo1();

            t.no  = x.no - y.no;
            t.no1 = x.no1 - y.no1;
            return(t);
        }
Example #2
0
        private static void Main(string[] args)
        {
            Demo1 d1 = new Demo1(20, 50);

            d1.showdata();
            Demo1 d2 = new Demo1(500, 100);

            d2.showdata();
            Demo1 s = new Demo1();

            s = d1 + d2;
            s.showdata();
        }