Ejemplo n.º 1
0
 public static Money operator /(Money m1, decimal m2)
 {
     decimal ret = (Decimal)Math.Ceiling((double)m1.TotalCopper / (double)m2);
     Money m = new Money(0, 0, ret);
     return m;
 }
Ejemplo n.º 2
0
 public static Money operator *(Money m1, decimal m2)
 {
     var ret = Math.Ceiling(m1.TotalCopper * m2);
     Money m = new Money(0, 0, ret);
     return m;
 }
Ejemplo n.º 3
0
 public static Money operator -(Money m1, Money m2)
 {
     var ret = m1.TotalCopper - m2.TotalCopper;
     Money m = new Money(0, 0, ret);
     return m;
 }
Ejemplo n.º 4
0
        public HotItem()
            : this(false)
        {
            BuyContext = new ItemContext(false, this);
            BuyContext.Rules = BuyRules;
            BuyContext.DisplayName = "Buy";
            SellContext = new ItemContext(true, this);
            SellContext.Rules = SellRules;
            SellContext.DisplayName = "Sell";

            UnitPriceMoney = new Money(0, 0, 0);
            //SellMoney = new Money();
            //BuyMoney = new Money();
        }