Esempio n. 1
0
 public CostHistory Compare(Share x, Share y)
 {
     if (ReferenceEquals(x, y))
     {
         return(null);
     }
     if (ReferenceEquals(x, null))
     {
         return(null);
     }
     if (ReferenceEquals(y, null))
     {
         return(null);
     }
     if (x.GetType() != y.GetType())
     {
         return(null);
     }
     return(new CostHistory((Math.Round(double.Parse(x.CheckTime)
                                        - double.Parse(y.CheckTime)), 2).ToString(), x.Cost,
                            (Math.Round(double.Parse(x.Cost) - double.Parse(y.Cost)), 2).ToString()));
 }