コード例 #1
0
ファイル: DataProcessing.cs プロジェクト: gtenmac/Homework
 static public void CalculatePersonTotalMoney(List <Person> personList, List <Thing> thingList)
 {
     foreach (var item in personList)
     {
         item.TotalMoney =
             DataProcessing.CalculateMoney(item.Pen, thingList.Sum(x => x.Pen)) +
             DataProcessing.CalculateMoney(item.Pen, thingList.Sum(x => x.Pencil)) +
             DataProcessing.CalculateMoney(item.Eraser, thingList.Sum(x => x.Eraser)) +
             DataProcessing.CalculateMoney(item.Ruler, thingList.Sum(x => x.Ruler)) +
             DataProcessing.CalculateMoney(item.LiWhite, thingList.Sum(x => x.LiWhite));
     }
 }