Пример #1
0
 /// <summary>
 /// equals
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public override bool Equals(object obj)
 {
     if (obj is DecimalStd || obj is decimal)
     {
         return(this == DecimalStd.ParseStd(obj));
     }
     else
     {
         return(false);
     }
 }
Пример #2
0
 /// <summary>
 /// %運算
 /// </summary>
 /// <param name="o1"></param>
 /// <param name="o2"></param>
 /// <returns></returns>
 public static DecimalStd operator %(DecimalStd o1, double o2)
 {
     return(DecimalStd.ParseStd(o1.Value % decimal.Parse(o2.ToString())));
 }
Пример #3
0
 /// <summary>
 /// %運算
 /// </summary>
 /// <param name="o1"></param>
 /// <param name="o2"></param>
 /// <returns></returns>
 public static DecimalStd operator %(DecimalStd o1, int o2)
 {
     return(DecimalStd.ParseStd(o1.Value % o2));
 }
Пример #4
0
 /// <summary>
 /// 除法運算
 /// </summary>
 /// <param name="o1"></param>
 /// <param name="o2"></param>
 /// <returns></returns>
 public static DecimalStd operator /(DecimalStd o1, float o2)
 {
     return(DecimalStd.ParseStd(o1.Value / decimal.Parse(o2.ToString())));
 }
Пример #5
0
 /// <summary>
 /// 除法運算
 /// </summary>
 /// <param name="o1"></param>
 /// <param name="o2"></param>
 /// <returns></returns>
 public static DecimalStd operator /(DecimalStd o1, decimal o2)
 {
     return(DecimalStd.ParseStd(o1.Value / o2));
 }
Пример #6
0
 /// <summary>
 /// 乘法運算
 /// </summary>
 /// <param name="o1"></param>
 /// <param name="o2"></param>
 /// <returns></returns>
 public static DecimalStd operator *(DecimalStd o1, DecimalStd o2)
 {
     return(DecimalStd.ParseStd(o1.Value * o2.Value));
 }