예제 #1
0
 /// <summary>
 /// Constructor with tre parameter
 /// </summary>
 /// <param name="date"></param>
 /// <param name="description"></param>
 /// <param name="category"></param>
 /// <param name="amount"></param>
 public Expenditure(DateTime date, string description, ExpencesEnum category, int amount)
 {
     this.date        = date;
     this.description = description;
     this.category    = category;
     this.amount      = amount;
 }
예제 #2
0
 /// <summary>
 /// This method creat a new Expenditure object with given parameters and adds the new Expenditure object in the end of the List.
 /// </summary>
 /// <param name="task"></param>
 public void Add(DateTime date, string description, ExpencesEnum category, int amount)
 {
     expenditureList.Add(new Expenditure(date, description, category, amount));
     expenditureList.Sort((x, y) => x.Date.CompareTo(y.Date));
 }