示例#1
0
    public IMoney Negate()
    {
        MoneyBag result = new MoneyBag();

        foreach (Money m in fMonies)
        {
            result.AppendMoney((Money)m.Negate());
        }
        return(result);
    }
示例#2
0
    public IMoney Multiply(int factor)
    {
        MoneyBag result = new MoneyBag();

        if (factor != 0)
        {
            foreach (Money m in fMonies)
            {
                result.AppendMoney((Money)m.Multiply(factor));
            }
        }
        return(result);
    }
示例#3
0
 public IMoney Negate()
 {
   MoneyBag result = new MoneyBag();
   foreach (Money m in fMonies)
   {
     result.AppendMoney((Money)m.Negate());
   }
   return result;
 }
示例#4
0
 public IMoney Multiply(int factor)
 {
   MoneyBag result = new MoneyBag();
   if (factor != 0)
   {
     foreach (Money m in fMonies)
     {
       result.AppendMoney((Money)m.Multiply(factor));
     }
   }
   return result;
 }