public void Add(CompareTrader o) { this.Shares += o.Shares; this.Gross += o.Gross; this.Comm += o.Comm; this.ECN += o.ECN; this.Other += o.Other; }
private static void AddSumInfo(DateTime startDate, DateTime endDate, List <CompareTrader> lst) { string trader = Regex.Replace(lst.First().Trader, "\\d+$", ""); var total = new CompareTrader() { StartDate = startDate.Date, EndDate = endDate.Date, Symbol2 = "合计", Trader = trader }; lst.ForEach(_ => total.Add(_)); lst.Add(total); }