public override bool Equals(object obj) { Income incomeComparing = (Income)obj; return((Amount == incomeComparing.Amount) && (Category.Equals(incomeComparing.Category)) && (Comment == incomeComparing.Comment) && (Date == incomeComparing.Date) && (Id == incomeComparing.Id) && (Method.Equals(incomeComparing.Method))); }
public override bool Equals(object obj) { Expense expenseComparing = (Expense)obj; return((Amount == expenseComparing.Amount) && (Category.Equals(expenseComparing.Category)) && (Comment == expenseComparing.Comment) && (Date == expenseComparing.Date) && (Id == expenseComparing.Id) && (Method.Equals(expenseComparing.Method))); }
public override bool Equals(object obj) { var expenseComparing = (Expense)obj; return((Amount == expenseComparing.Amount) && ((Category == null && expenseComparing.Category == null) || Category.Equals(expenseComparing.Category)) && (Comments == expenseComparing.Comments) && (Date == expenseComparing.Date) && (Id == expenseComparing.Id) && ((Method == null && expenseComparing.Method == null) || Method.Equals(expenseComparing.Method))); }
public override bool Equals(object obj) { var incomeComparing = (Income)obj; return(incomeComparing != null && Amount == incomeComparing.Amount && (Category == null && incomeComparing.Category == null || Category?.Equals(incomeComparing.Category) == true) && Comments == incomeComparing.Comments && Date == incomeComparing.Date && Id == incomeComparing.Id && (Method == null && incomeComparing.Method == null || Method?.Equals(incomeComparing.Method) == true)); }
public override bool Equals(object obj) { var expenseComparing = (Expense)obj; if (expenseComparing == null) { return(false); } return(Amount == expenseComparing.Amount && (Category == null && expenseComparing.Category == null || Category?.Equals(expenseComparing.Category) == true) && Comments == expenseComparing.Comments && Date == expenseComparing.Date && Id == expenseComparing.Id && (Method == null && expenseComparing.Method == null || Method?.Equals(expenseComparing.Method) == true)); }