Beispiel #1
0
        public static Price operator -(Price _priceA, Price _priceB)
        {
            Price newPrice = new Price(_priceA.MetalCost - _priceB.MetalCost, _priceA.CrystalCost - _priceB.CrystalCost, _priceA.DeuteriumCost - _priceB.DeuteriumCost);    //  Subtract a and b and create  new price object. Then return it

            return(newPrice);
        }
Beispiel #2
0
        public static Price operator +(Price _priceA, Price _priceB)
        {
            Price newPrice = new Price(_priceA.MetalCost + _priceB.MetalCost, _priceA.CrystalCost + _priceB.CrystalCost, _priceA.DeuteriumCost + _priceB.DeuteriumCost);    //  Add a and b together and create a new price object. Then return it

            return(newPrice);
        }