示例#1
0
        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)));
        }
示例#2
0
        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)));
        }
示例#3
0
        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)));
        }
示例#4
0
        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));
        }
示例#5
0
        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));
        }